UTIMETS(2) UTIMETS(2) NAME utimets - set file access and modification times SYNOPSIS #include <sys/time.h> utimets(const char *file, const struct timespec timets[2]); DESCRIPTION The utimets call uses the "accessed" and "updated" times in that order from the timets vector to set the corresponding recorded times for file. The caller must be the owner of the file or have write permission to use utimets in this manner. This routine is not part of any standard and is specific to IRIX 6.5.10 and later. Applications that call utimets may be run under earlier versions of IRIX if they test for the existence of the interface and fall back to using one of the older file time setting interfaces: #include <optional_sym.h> if (_MIPS_SYMBOL_PRESENT(utimets)) { utimets(file, ts); } else { struct utimbuf tb; tb.actime = ts[0].tv_sec; tb.modtime = ts[1].tv_sec; utime(file, &tb); } RETURN VALUE Upon successful completion, a value of 0 is returned. Otherwise, a value of -1 is returned and errno is set to indicate the error. utimets will fail if one or more of the following are true: [ENOTDIR] A component of the path prefix is not a directory. [EINVAL] The pathname contains a character with the high-order bit set. [ENAMETOOLONG] A component of a pathname exceeded 255 characters, or an entire path name exceeded 1023 characters. [ENOENT] The named file does not exist. [ELOOP] Too many symbolic links were encountered in translating the pathname. [EPERM] The process is not super-user and not the owner of the file. [EACCES] Search permission is denied for a component of the path prefix. [EROFS] The file system containing the file is mounted read-only. [EFAULT] File or timets points outside the process's allocated address space. [EIO] An I/O error occurred while reading or writing the affected inode. SEE ALSO stat(2), utime(2) Page 2