1FUTIMESAT(2) Linux Programmer's Manual FUTIMESAT(2)
2
3
4
6 futimesat - change timestamps of a file relative to a directory file
7 descriptor
8
10 #include <fcntl.h> /* Definition of AT_* constants */
11
12 int futimesat(int dirfd, const char *pathname,
13 const struct timeval times[2]);
14
15 Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
16
17 futimesat():
18 Since glibc 2.10: _XOPEN_SOURCE >= 700 || _POSIX_C_SOURCE >= 200809L
19 Before glibc 2.10: _ATFILE_SOURCE
20
22 This system call is obsolete. Use utimensat(2) instead.
23
24 The futimesat() system call operates in exactly the same way as
25 utimes(2), except for the differences described in this manual page.
26
27 If the pathname given in pathname is relative, then it is interpreted
28 relative to the directory referred to by the file descriptor dirfd
29 (rather than relative to the current working directory of the calling
30 process, as is done by utimes(2) for a relative pathname).
31
32 If pathname is relative and dirfd is the special value AT_FDCWD, then
33 pathname is interpreted relative to the current working directory of
34 the calling process (like utimes(2)).
35
36 If pathname is absolute, then dirfd is ignored.
37
39 On success, futimesat() returns a 0. On error, -1 is returned and
40 errno is set to indicate the error.
41
43 The same errors that occur for utimes(2) can also occur for futime‐
44 sat(). The following additional errors can occur for futimesat():
45
46 EBADF dirfd is not a valid file descriptor.
47
48 ENOTDIR
49 pathname is relative and dirfd is a file descriptor referring to
50 a file other than a directory.
51
53 futimesat() was added to Linux in kernel 2.6.16.
54
56 This system call is nonstandard. It was implemented from a specifica‐
57 tion that was proposed for POSIX.1, but that specification was replaced
58 by the one for utimensat(2).
59
60 A similar system call exists on Solaris.
61
63 Glibc Notes
64 If pathname is NULL, then the glibc futimesat() wrapper function
65 updates the times for the file referred to by dirfd.
66
68 stat(2), utimensat(2), utimes(2), futimes(3), path_resolution(7)
69
71 This page is part of release 3.25 of the Linux man-pages project. A
72 description of the project, and information about reporting bugs, can
73 be found at http://www.kernel.org/doc/man-pages/.
74
75
76
77Linux 2009-12-13 FUTIMESAT(2)