All rights reserved. The Berkeley software License Agreement
specifies the terms and conditions for redistribution.
@(#)utimes.2 6.4 (Berkeley) 8/26/85
#include <sys/types.h> #include <utime.h> int utime(const char *file, struct utimbuf *times)
Struct utimbuf is defined in <utime.h> as follows:
struct utimbuf { time_t actime; /* access time */ time_t modtime; /* modification time */ };
The caller must be the owner of the file or the super-user. The \*(lqinode-changed\*(rq time of the file is set to the current time.
15 [ENOTDIR] A component of the path prefix is not a directory.
15 [EINVAL] The pathname contains a character with the high-order bit set.
15 [ENAMETOOLONG] The path name exceeds PATH_MAX characters.
15 [ENOENT] The named file does not exist.
15 [ELOOP] Too many symbolic links were encountered in translating the pathname. (Minix-vmd)
15 [EPERM] The process is not super-user and not the owner of the file.
15 [EACCES] Search permission is denied for a component of the path prefix.
15 [EROFS] The file system containing the file is mounted read-only.
15 [EFAULT] File or times points outside the process's allocated address space.
15 [EIO] An I/O error occurred while reading or writing the affected inode.