Sets file access and modification times.
#include <utime.h> int utime ( const char *path, const struct utimbuf *times);
(IN) Points to a string containing the path of the file for which access and modification times are to be set.
(IN) Points to a utimbuf structure containing the time values. If times is a NULL pointer, the times are set to the current time.
If successful, returns 0. Otherwise, does not change the file times, returns -1, and sets errno to one of the following values:
The caller must have the necessary rights to successfully modify the file's access or modification time.
If the path parameter specifies a directory, the modification time and date are updated and the last accessed date is ignored (because directories do not have a last accessed date).
The modification time is taken from the modtime field in the utimbuf structure, and the last accessed date is taken from the actime field.
DOS has no notion of “accessed time.” Therefore when time is being set on the DOS partition, the value in the actime field is undefined, and only the modtime field is used.