Next: va_arg
, Previous: utimensat
, Up: ISO C and POSIX Function Substitutes [Contents][Index]
utimes
POSIX specification:
https://pubs.opengroup.org/onlinepubs/9699919799/functions/utimes.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
utimensat(AT_FDCWD,file,times,0)
, or the gnulib module utimens
,
instead.
utimes (file, NULL)
fails to set the
file’s timestamp to the current time:
glibc 2.3.3.
utimes
failed on read-only files when
utime
worked fine.
glibc 2.2.5.
Extension: Gnulib provides a module ‘utimens’ that works around these problems and allows to set the time with nanosecond resolution (as far as supported by the file system).