lutimes.3
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 12 The access and modification times of the file named by 13 .Fa path 14 are changed as specified by the argument 15 .Fa times , 16 even if 17 .Fa path 18 specifies a symbolic link (for 19 .Xr utimes 2 20 the times of the file referenced by the symbolic link are changed). 21 .Pp 22 If 23 .Fa times 24 is 25 .Dv NULL , 26 the access and modification times are set to the current time. 27 The caller must be the owner of the file, have permission to 28 write the file, or be the super-user. 29 .Pp 30 If 31 .Fa times 32 is 33 .Pf non- Dv NULL , 34 it is assumed to point to an array of two timeval structures. 35 The access time is set to the value of the first element, and the 36 modification time is set to the value of the second element. 37 The caller must be the owner of the file or be the super-user. 38 .Pp 39 In either case, the inode-change-time of the file is set to the current 40 time. 41 .Sh NOTE 42 Instead of being a system call, 43 .Fn lutimes 44 is emulated using 45 .Xr setattrlist 2 . 46 Not all file systems support 47 .Xr setattrlist 2 . 48 .Sh RETURN VALUES 49 Upon successful completion, a value of 0 is returned. 50 Otherwise, -1 is returned and the global variable 51 .Va errno 52 is set to indicate the error. 53 .Sh ERRORS 54 The 55 .Fn lutimes 56 call may return the same errors as 57 .Xr utimes 2 58 and 59 .Xr setattrlist 2 . 60 .Sh SEE ALSO 61 .Xr utimes 2 , 62 .Xr setattrlist 2