#include <utime.h>
int utime(path, times) char *path; struct utimbuf *times;
utime() sets the access and modification times of the file named by path.
If times is NULL, the access and modification times are set to the current time. The effective user ID (UID) of the calling process must match the owner of the file or the process must have write permission for the file to use utime() in this manner.
If times is not NULL, it is assumed to point to a utimbuf structure, defined in <utime.h> as:
struct utimbuf { time_t actime; /* set the access time */ time_t modtime; /* set the modification time */ };
The access time is set to the value of the first member, and the modification time is set to the value of the second member. The times contained in this structure are measured in seconds since 00:00:00 GMT Jan 1, 1970. Only the owner of the file or the super-user may use utime() in this manner.
Upon successful completion, utime() marks for update the st_ctime field of the file.
utime() returns:
A pathname component is longer than {NAME_MAX} while {_POSIX_NO_TRUNC} is in effect (see pathconf.2v
In addition to the above, the following may also occur:
Created by unroff & hp-tools. © somebody (See intro for details). All Rights Reserved. Last modified 11/5/97