set file's last access and modification time to current time
| 315 | |
| 316 | // set file's last access and modification time to current time |
| 317 | bool touchFile(const char* pathname) |
| 318 | { |
| 319 | #ifdef HAVE_UTIME_H |
| 320 | while (utime(pathname, NULL) < 0) |
| 321 | { |
| 322 | if (SYSCALL_INTERRUPTED(errno)) |
| 323 | { |
| 324 | continue; |
| 325 | } |
| 326 | return false; |
| 327 | } |
| 328 | |
| 329 | return true; |
| 330 | #else |
| 331 | errno = ENOSYS; |
| 332 | return false; |
| 333 | #endif |
| 334 | } |
| 335 | |
| 336 | // check if OS has support for IPv6 protocol |
| 337 | bool isIPv6supported() |