![]() ![]() If pathname is absolute, then dirfd is ignored. If pathname is relative and dirfd is the special value AT_FDCWD, then pathname is interpreted relative to the current workingĭirectory of the calling process (like utimes(2)). Than relative to the current working directory of the calling process, as is done by utimes(2) for a relative pathname). ![]() Utimensat() specifics If pathname is relative, then by default it is interpreted relative to the directory referred to by the open file descriptor, dirfd (rather Modified, but other error conditions may still be detected. If both tv_nsec fields are specified as UTIME_OMIT, then no file ownership or permission checks are performed, and the file timestamps are not UTIME_NOW and both tv_nsec fields are not UTIME_OMIT), either condition 2 or 3 above must apply. To make any change other than setting both timestamps to the current time (i.e., times is not NULL, and both tv_nsec fields are not The caller must have appropriate privileges. The caller's effective user ID must match the owner of the file or The caller must have write access to the file Permissions requirements To set both file timestamps to the current time (i.e., times is NULL, or both tv_nsec fields specify UTIME_NOW), either: If times is NULL, then both timestamps are set to the current time. In both of these cases, the value of the corresponding tv_sec field is ignored. If the tv_nsec field of one of the timespec structures has the special value UTIME_OMIT, then the corresponding file If the tv_nsec field of one of the timespec structures has the special value UTIME_NOW, then the corresponding file timestamp is set to } Updated file timestamps are set to the greatest value supported by the file system that is not greater than the specified time. This information is conveyed in a structure of the following form: Each of the elements of times specifies a time as the number of seconds and Times specifies the new "last modification time" ( mtime). Is specified via an open file descriptor, fd.įor both calls, the new file timestamps are specified in the array times: times specifies the new "last access time" ( atime) With futimens() the file whose timestamps are to be updated ![]() With utimensat() the file is specified via the pathname given in pathname. Utimes(2), which permit only second and microsecond precision, respectively, when setting file timestamps. This contrasts with the historical utime(2) and Utimensat() and futimens() update the timestamps of a file with nanosecond precision. Int futimens(int fd, const struct timespec times ) įeature Test Macro Requirements for glibc (see feature_test_macros(7)): Int utimensat(int dirfd, const char * pathname ,Ĭonst struct timespec times, int flags ) Synopsis #include /* Definition of AT_* constants */ Utimensat, futimens - change file timestamps with nanosecond precision ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |