set file's last access and modification time to current time
| 329 | |
| 330 | // set file's last access and modification time to current time |
| 331 | bool touchFile(const char* pathname) |
| 332 | { |
| 333 | FILETIME ft; |
| 334 | SYSTEMTIME st; |
| 335 | |
| 336 | HANDLE hFile = CreateFile(pathname, |
| 337 | GENERIC_READ | FILE_WRITE_ATTRIBUTES, |
| 338 | FILE_SHARE_READ | FILE_SHARE_WRITE, |
| 339 | ISC_get_security_desc(), |
| 340 | OPEN_EXISTING, |
| 341 | FILE_ATTRIBUTE_NORMAL, |
| 342 | 0); |
| 343 | if (hFile == INVALID_HANDLE_VALUE) |
| 344 | return false; |
| 345 | |
| 346 | GetSystemTime(&st); |
| 347 | const bool ret = SystemTimeToFileTime(&st, &ft) && SetFileTime(hFile, NULL, &ft, &ft); |
| 348 | CloseHandle(hFile); |
| 349 | |
| 350 | return ret; |
| 351 | } |
| 352 | |
| 353 | // check if OS have support for IPv6 protocol |
| 354 | bool isIPv6supported() |
nothing calls this directly
no test coverage detected