53 write access to the file or the {PRIV_FILE_OWNER} privilege to use this
54 call in this manner. Upon completion, utimes() will mark the time of
55 the last file status change, st_ctime, for update.
56
57
58 The futimens() and utimensat() functions also set access and
59 modification times; however, instead of taking struct timeval, they
60 take timespec_t which allows for nanosecond granularity. The futimens()
61 function sets the access and modification times on the file descriptor
62 referenced by filedes.
63
64
65 The utimensat() function determines the file to set the access and
66 modification times in an similar way to futemsat(). If the argument
67 path is an absolute path, then the argument filedes is ignored;
68 otherwise, path is interpreted as a path relative to the directory
69 specified by filedes. If filedes is set to AT_FDCWD, then path is
70 resolved relative to the current working directory. The behavior when
71 encountering symbolic links may be controlled by the value of the flag
72 argument. If the value of flag is the constant AT_SYMLINK_NOFOLLOW,
73 then when a symbolic link is encountered while resoloving a path, it
74 will not be followed. Otherwise, the value of flag should be 0.
75
76 RETURN VALUES
77 Upon successful completion, 0 is returned. Otherwise, -1 is returned,
78 errno is set to indicate the error, and the file times will not be
79 affected.
80
81 ERRORS
82 The utimes(), futimesat(), futimens(), and utimensat() functions will
83 fail if:
84
85 EACCES
86 Search permission is denied by a component of the path
87 prefix; or the times argument is a null pointer and the
88 effective user ID of the process does not match the
89 owner of the file and write access is denied.
90
91
92 EFAULT
93 The path or times argument points to an illegal
|
53 write access to the file or the {PRIV_FILE_OWNER} privilege to use this
54 call in this manner. Upon completion, utimes() will mark the time of
55 the last file status change, st_ctime, for update.
56
57
58 The futimens() and utimensat() functions also set access and
59 modification times; however, instead of taking struct timeval, they
60 take timespec_t which allows for nanosecond granularity. The futimens()
61 function sets the access and modification times on the file descriptor
62 referenced by filedes.
63
64
65 The utimensat() function determines the file to set the access and
66 modification times in an similar way to futemsat(). If the argument
67 path is an absolute path, then the argument filedes is ignored;
68 otherwise, path is interpreted as a path relative to the directory
69 specified by filedes. If filedes is set to AT_FDCWD, then path is
70 resolved relative to the current working directory. The behavior when
71 encountering symbolic links may be controlled by the value of the flag
72 argument. If the value of flag is the constant AT_SYMLINK_NOFOLLOW,
73 then when a symbolic link is encountered while resolving a path, it
74 will not be followed. Otherwise, the value of flag should be 0.
75
76 RETURN VALUES
77 Upon successful completion, 0 is returned. Otherwise, -1 is returned,
78 errno is set to indicate the error, and the file times will not be
79 affected.
80
81 ERRORS
82 The utimes(), futimesat(), futimens(), and utimensat() functions will
83 fail if:
84
85 EACCES
86 Search permission is denied by a component of the path
87 prefix; or the times argument is a null pointer and the
88 effective user ID of the process does not match the
89 owner of the file and write access is denied.
90
91
92 EFAULT
93 The path or times argument points to an illegal
|