1futimesat(2) System Calls Manual futimesat(2)
2
3
4
6 futimesat - change timestamps of a file relative to a directory file
7 descriptor
8
10 Standard C library (libc, -lc)
11
13 #include <fcntl.h> /* Definition of AT_* constants */
14 #include <sys/time.h>
15
16 [[deprecated]] int futimesat(int dirfd, const char *pathname,
17 const struct timeval times[2]);
18
19 Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
20
21 futimesat():
22 _GNU_SOURCE
23
25 This system call is obsolete. Use utimensat(2) instead.
26
27 The futimesat() system call operates in exactly the same way as
28 utimes(2), except for the differences described in this manual page.
29
30 If the pathname given in pathname is relative, then it is interpreted
31 relative to the directory referred to by the file descriptor dirfd
32 (rather than relative to the current working directory of the calling
33 process, as is done by utimes(2) for a relative pathname).
34
35 If pathname is relative and dirfd is the special value AT_FDCWD, then
36 pathname is interpreted relative to the current working directory of
37 the calling process (like utimes(2)).
38
39 If pathname is absolute, then dirfd is ignored. (See openat(2) for an
40 explanation of why the dirfd argument is useful.)
41
43 On success, futimesat() returns a 0. On error, -1 is returned and er‐
44 rno is set to indicate the error.
45
47 The same errors that occur for utimes(2) can also occur for futime‐
48 sat(). The following additional errors can occur for futimesat():
49
50 EBADF pathname is relative but dirfd is neither AT_FDCWD nor a valid
51 file descriptor.
52
53 ENOTDIR
54 pathname is relative and dirfd is a file descriptor referring to
55 a file other than a directory.
56
58 glibc
59 If pathname is NULL, then the glibc futimesat() wrapper function up‐
60 dates the times for the file referred to by dirfd.
61
63 None.
64
66 Linux 2.6.16, glibc 2.4.
67
68 It was implemented from a specification that was proposed for POSIX.1,
69 but that specification was replaced by the one for utimensat(2).
70
71 A similar system call exists on Solaris.
72
75 stat(2), utimensat(2), utimes(2), futimes(3), path_resolution(7)
76
77
78
79Linux man-pages 6.05 2023-03-30 futimesat(2)