1FUTIMESAT(2) Linux Programmer's Manual FUTIMESAT(2)
2
3
4
6 futimes - change timestamps of a file relative to a directory file
7 descriptor
8
10 #define _ATFILE_SOURCE
11 #include <fcntl.h>
12
13 int futimesat(int dirfd, const char *pathname,
14 const struct timeval times[2]);
15
17 The futimesat() system call operates in exactly the same way as
18 utimes(2), except for the differences described in this manual page.
19
20 If the pathname given in pathname is relative, then it is interpreted
21 relative to the directory referred to by the file descriptor dirfd
22 (rather than relative to the current working directory of the calling
23 process, as is done by utimes(2) for a relative pathname).
24
25 If pathname is relative and dirfd is the special value AT_FDCWD, then
26 pathname is interpreted relative to the current working directory of
27 the calling process (like utimes(2)).
28
29 If pathname is absolute, then dirfd is ignored.
30
32 On success, futimesat() returns a 0. On error, -1 is returned and
33 errno is set to indicate the error.
34
36 The same errors that occur for utimes(2) can also occur for futimeā
37 sat(). The following additional errors can occur for futimesat():
38
39 EBADF dirfd is not a valid file descriptor.
40
41 ENOTDIR
42 pathname is relative and dirfd is a file descriptor referring to
43 a file other than a directory.
44
46 This system call is non-standard but is proposed for inclusion in a
47 future revision of POSIX.1. A similar system call exists on Solaris.
48
50 If pathname is NULL, then the glibc futimes() wrapper function updates
51 the times for the file referred to by dirfd.
52
54 futimesat() was added to Linux in kernel 2.6.16.
55
57 path_resolution(2), stat(2), utimes(2), futimes(3)
58
59
60
61Linux 2.6.16 2006-05-05 FUTIMESAT(2)