Penguin
Annotated edit history of utime(2) version 1, including all changes. View license author blame.
Rev Author # Line
1 perry 1 UTIME
2 !!!UTIME
3 NAME
4 SYNOPSIS
5 DESCRIPTION
6 RETURN VALUE
7 ERRORS
8 CONFORMING TO
9 SEE ALSO
10 ----
11 !!NAME
12
13
14 utime, utimes - change access and/or modification times of an inode
15 !!SYNOPSIS
16
17
18 __#include __
19 #include __
20
21
22 __int utime(const char *__''filename''__, struct
23 utimbuf *__''buf''__);__
24
25
26 __#include __
27
28
29 __int utimes(char *__''filename''__, struct timeval
30 *__''tvp''__);__
31 !!DESCRIPTION
32
33
34 __utime__ changes the access and modification times of
35 the inode specified by ''filename'' to the ''actime''
36 and ''modtime'' fields of ''buf'' respectively. If
37 ''buf'' is __NULL__, then the access and modification
38 times of the file are set to the current time. The
39 ''utimbuf'' structure is:
40
41
42 struct utimbuf {
43 time_t actime; /* access time */
44 time_t modtime; /* modification time */
45 };
46
47
48 In the Linux DLL 4.4.1 libraries, __utimes__ is just a
49 wrapper for __utime__: ''tvp''[[0].''tv_sec'' is
50 ''actime'', and ''tvp''[[1].''tv_sec'' is
51 ''modtime''. The ''timeval'' structure
52 is:
53
54
55 struct timeval {
56 long tv_sec; /* seconds */
57 long tv_usec; /* microseconds */
58 };
59 !!RETURN VALUE
60
61
62 On success, zero is returned. On error, -1 is returned, and
63 ''errno'' is set appropriately.
64 !!ERRORS
65
66
67 Other errors may occur.
68
69
70 __EACCES__
71
72
73 Permission to write the file is denied.
74
75
76 __ENOENT__
77
78
79 ''filename'' does not exist.
80 !!CONFORMING TO
81
82
83 __utime__: SVr4, SVID, POSIX. SVr4 documents additional
84 error conditions EFAULT, EINTR, ELOOP, EMULTIHOP,
85 ENAMETOOLONG, ENOLINK, ENOTDIR, ENOLINK, ENOTDIR, EPERM,
86 EROFS.__
87 utimes__: BSD 4.3
88 !!SEE ALSO
89
90
91 stat(2)
92 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.