int utimes(const char *pathname, const struct timeval times);
If times is NULL, the access and modification
times of the file are set to the current time. The effective user ID
of the process must match the owner of the file or the process
must have write permission to the file or appropriate privileges
If times is not NULL, it is an array of
timeval structures. The first array member
specifies the access time, and the second array member specifies
the modification time. Only the owner of the file and processes
with appropriate privileges can use the
Points to a path name that names a file.
Is the array that specifies the new access and modification times.
A component of the pathname prefix denies search permission.
pathname is an invalid pointer, or times is not NULL and is an invalid pointer.
A signal interrupted the call.
The length of the pathname parameter exceeds PATH_MAX or a pathname component is longer than NAME_MAX.
The named file does not exist or pathname points to an empty string.
A component of the pathname prefix is not a directory.
The process has insufficient permissions.
The file system that contains the file is mounted as read-only.
Only the NTFS file system supports full file times. Refer to File Systems in the Windows Concepts chapter of the MKS Toolkit UNIX to Windows Porting Guide.
On Windows NT/2000/XP/2003/Vista/7/2008/8/2012, you must be a member of the Backup Operators group (or have equivalent access rights) to modify the times on a directory.
MKS Toolkit for Professional Developers
MKS Toolkit for Enterprise Developers
MKS Toolkit for Enterprise Developers 64-Bit Edition
MKS Toolkit 9.5 Documentation Build 3.