1FUTIMESAT(2)               Linux Programmer's Manual              FUTIMESAT(2)
2
3
4

NAME

6       futimesat  -  change  timestamps of a file relative to a directory file
7       descriptor
8

SYNOPSIS

10       #include <fcntl.h>            /* Definition of AT_* constants */
11       #include <sys/time.h>
12
13       int futimesat(int dirfd, const char *pathname,
14                     const struct timeval times[2]);
15
16   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
17
18       futimesat():
19           _GNU_SOURCE
20

DESCRIPTION

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

RETURN VALUE

39       On success, futimesat() returns a 0.  On error, -1 is returned and  er‐
40       rno is set to indicate the error.
41

ERRORS

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

VERSIONS

53       futimesat()  was  added  to Linux in kernel 2.6.16; library support was
54       added to glibc in version 2.4.
55

CONFORMING TO

57       This system call is nonstandard.  It was implemented from a  specifica‐
58       tion that was proposed for POSIX.1, but that specification was replaced
59       by the one for utimensat(2).
60
61       A similar system call exists on Solaris.
62

NOTES

64   Glibc notes
65       If pathname is NULL, then the glibc futimesat()  wrapper  function  up‐
66       dates the times for the file referred to by dirfd.
67

SEE ALSO

69       stat(2), utimensat(2), utimes(2), futimes(3), path_resolution(7)
70

COLOPHON

72       This  page  is  part of release 5.12 of the Linux man-pages project.  A
73       description of the project, information about reporting bugs,  and  the
74       latest     version     of     this    page,    can    be    found    at
75       https://www.kernel.org/doc/man-pages/.
76
77
78
79Linux                             2017-09-15                      FUTIMESAT(2)
Impressum