]> git.saurik.com Git - apple/libc.git/blame - emulated/lutimes.3
Libc-498.tar.gz
[apple/libc.git] / emulated / lutimes.3
CommitLineData
224c7076
A
1.Dd Aug 13, 2006
2.Dt LUTIMES 3
3.Os
4.Sh NAME
5.Nm lutimes
6.Nd set file access and modification times of symlink
7.Sh SYNOPSIS
8.In sys/time.h
9.Ft int
10.Fn lutimes "const char *path" "struct timeval times[2]"
11.Sh DESCRIPTION
12The access and modification times of the file named by
13.Fa path
14are changed as specified by the argument
15.Fa times ,
16even if
17.Fa path
18specifies a symbolic link (for
19.Xr utimes 2
20the times of the file referenced by the symbolic link are changed).
21.Pp
22If
23.Fa times
24is
25.Dv NULL ,
26the access and modification times are set to the current time.
27The caller must be the owner of the file, have permission to
28write the file, or be the super-user.
29.Pp
30If
31.Fa times
32is
33.Pf non- Dv NULL ,
34it is assumed to point to an array of two timeval structures.
35The access time is set to the value of the first element, and the
36modification time is set to the value of the second element.
37The caller must be the owner of the file or be the super-user.
38.Pp
39In either case, the inode-change-time of the file is set to the current
40time.
41.Sh NOTE
42Instead of being a system call,
43.Fn lutimes
44is emulated using
45.Xr setattrlist 2 .
46Not all file systems support
47.Xr setattrlist 2 .
48.Sh RETURN VALUES
49Upon successful completion, a value of 0 is returned.
50Otherwise, -1 is returned and the global variable
51.Va errno
52is set to indicate the error.
53.Sh ERRORS
54The
55.Fn lutimes
56call may return the same errors as
57.Xr utimes 2
58and
59.Xr setattrlist 2 .
60.Sh SEE ALSO
61.Xr utimes 2 ,
62.Xr setattrlist 2