UTIME(3) | NetBSD Library Functions Manual | UTIME(3) |
The utime() function sets the access and modification times of the named file.
If timep is NULL, the access and modification times are set to the current time. The calling process must be the owner of the file or have permission to write the file.
If timep is non-NULL, time is assumed to be a pointer to a utimbuf structure, as defined in <utime.h>:
struct utimbuf { time_t actime; /* Access time */ time_t modtime; /* Modification time */ };
The access time is set to the value of the actime member, and the modification time is set to the value of the modtime member. The times are measured in seconds since 0 hours, 0 minutes, 0 seconds, January 1, 1970 Coordinated Universal Time (UTC). The calling process 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.
April 29, 2010 | NetBSD 5.99 |