Table of Contents
The
function sets the access and modification times of the named file. If
is the access and modification times are set to the current time. The
caller must be the owner of the file, have permission to write the file,
or be the super-user. If is it is assumed to point to an array of two
timeval structures. The access time is set to the value of the first element,
and the modification time is set to the value of the second element. The
caller must be the owner of the file or be the super-user. In either case,
the inode-change-time of the file is set to the current time.
Upon
successful completion, a value of 0 is returned. Otherwise, a value of -1
is returned and is set to indicate the error.
will fail if: Search
permission is denied for a component of the path prefix; or the argument
is and the effective user ID of the process does not match the owner of
the file, and is not the super-user, and write access is denied. or points
outside the process’s allocated address space. An I/O error occurred while
reading or writing the affected inode. Too many symbolic links were encountered
in translating the pathname. A component of a pathname exceeded characters,
or an entire path name exceeded characters. The named file does not exist.
A component of the path prefix is not a directory. The argument is not
and the calling process’s effective user ID does not match the owner of
the file and is not the super-user. The file system containing the file
is mounted read-only.
The function call appeared in
Table of Contents