Syntax | #include <utime.h> Optional int utime(const char *path, const struct utimbuf *times); CRTE111A30 | |
Description |
If times is a null pointer, 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 have appropriate privileges to use If times is not a null pointer, then times is interpreted as a pointer to a The times in the structure Upon successful completion, The function The structure time_t actime; /* access time */ time_t modtime; /* modification time */ The structure time64_t actime; /* access time */ time64_t modtime; /* modification time */ | |
Return val. | 0 | if successful. |
-1 | if an error occurs. | |
Errors |
| |
|
| Search permission is denied for a component of the path; or the effective user ID does not match that of a system administrator or the owner of the file, times is a null pointer, and write access is denied. |
| Extension | |
|
| times is not null and points outside the allocated space of the process |
|
| A signal was caught during the system call |
|
| An attempt was made to access a BS2000 file. |
|
| Too many symbolic links were encountered in resolving path. (End) |
|
| |
| The length of path exceeds | |
| The named file does not exist. | |
| A component of the path is not a directory. | |
| The effective user ID does not match that of a system administrator or the owner of the file and times is a null pointer. | |
| The file system containing the file is mounted as a read-only file system. | |
| ||
|
| POSIX-BC correction status < A47. |
Notes |
| |
See also |
|