man-pages/man2/futimesat.2.html
2021-03-31 01:06:50 +01:00

219 lines
4.7 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of FUTIMESAT</TITLE>
</HEAD><BODY>
<H1>FUTIMESAT</H1>
Section: Linux Programmer's Manual (2)<BR>Updated: 2017-09-15<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
futimesat - change timestamps of a file relative to a directory file descriptor
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<PRE>
<B>#include &lt;<A HREF="file:///usr/include/fcntl.h">fcntl.h</A>&gt; /* Definition of AT_* constants */</B>
<B>#include &lt;<A HREF="file:///usr/include/sys/time.h">sys/time.h</A>&gt;</B>
<B>int futimesat(int </B><I>dirfd</I><B>, const char *</B><I>pathname</I><B>,</B>
<B> const struct timeval </B><I>times</I><B>[2]);</B>
</PRE>
<P>
Feature Test Macro Requirements for glibc (see
<B><A HREF="/cgi-bin/man/man2html?7+feature_test_macros">feature_test_macros</A></B>(7)):
<P>
<B>futimesat</B>():
_GNU_SOURCE
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
This system call is obsolete.
Use
<B><A HREF="/cgi-bin/man/man2html?2+utimensat">utimensat</A></B>(2)
instead.
<P>
The
<B>futimesat</B>()
system call operates in exactly the same way as
<B><A HREF="/cgi-bin/man/man2html?2+utimes">utimes</A></B>(2),
except for the differences described in this manual page.
<P>
If the pathname given in
<I>pathname</I>
is relative, then it is interpreted relative to the directory
referred to by the file descriptor
<I>dirfd</I>
(rather than relative to the current working directory of
the calling process, as is done by
<B><A HREF="/cgi-bin/man/man2html?2+utimes">utimes</A></B>(2)
for a relative pathname).
<P>
If
<I>pathname</I>
is relative and
<I>dirfd</I>
is the special value
<B>AT_FDCWD</B>,
then
<I>pathname</I>
is interpreted relative to the current working
directory of the calling process (like
<B><A HREF="/cgi-bin/man/man2html?2+utimes">utimes</A></B>(2)).
<P>
If
<I>pathname</I>
is absolute, then
<I>dirfd</I>
is ignored.
<A NAME="lbAE">&nbsp;</A>
<H2>RETURN VALUE</H2>
On success,
<B>futimesat</B>()
returns a 0.
On error, -1 is returned and
<I>errno</I>
is set to indicate the error.
<A NAME="lbAF">&nbsp;</A>
<H2>ERRORS</H2>
The same errors that occur for
<B><A HREF="/cgi-bin/man/man2html?2+utimes">utimes</A></B>(2)
can also occur for
<B>futimesat</B>().
The following additional errors can occur for
<B>futimesat</B>():
<DL COMPACT>
<DT id="1"><B>EBADF</B>
<DD>
<I>dirfd</I>
is not a valid file descriptor.
<DT id="2"><B>ENOTDIR</B>
<DD>
<I>pathname</I>
is relative and
<I>dirfd</I>
is a file descriptor referring to a file other than a directory.
</DL>
<A NAME="lbAG">&nbsp;</A>
<H2>VERSIONS</H2>
<B>futimesat</B>()
was added to Linux in kernel 2.6.16;
library support was added to glibc in version 2.4.
<A NAME="lbAH">&nbsp;</A>
<H2>CONFORMING TO</H2>
This system call is nonstandard.
It was implemented from a specification that was proposed for POSIX.1,
but that specification was replaced by the one for
<B><A HREF="/cgi-bin/man/man2html?2+utimensat">utimensat</A></B>(2).
<P>
A similar system call exists on Solaris.
<A NAME="lbAI">&nbsp;</A>
<H2>NOTES</H2>
<A NAME="lbAJ">&nbsp;</A>
<H3>Glibc notes</H3>
If
<I>pathname</I>
is NULL, then the glibc
<B>futimesat</B>()
wrapper function updates the times for the file referred to by
<I>dirfd</I>.
<A NAME="lbAK">&nbsp;</A>
<H2>SEE ALSO</H2>
<B><A HREF="/cgi-bin/man/man2html?2+stat">stat</A></B>(2),
<B><A HREF="/cgi-bin/man/man2html?2+utimensat">utimensat</A></B>(2),
<B><A HREF="/cgi-bin/man/man2html?2+utimes">utimes</A></B>(2),
<B><A HREF="/cgi-bin/man/man2html?3+futimes">futimes</A></B>(3),
<B><A HREF="/cgi-bin/man/man2html?7+path_resolution">path_resolution</A></B>(7)
<A NAME="lbAL">&nbsp;</A>
<H2>COLOPHON</H2>
This page is part of release 5.05 of the Linux
<I>man-pages</I>
project.
A description of the project,
information about reporting bugs,
and the latest version of this page,
can be found at
<A HREF="https://www.kernel.org/doc/man-pages/.">https://www.kernel.org/doc/man-pages/.</A>
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="3"><A HREF="#lbAB">NAME</A><DD>
<DT id="4"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="5"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="6"><A HREF="#lbAE">RETURN VALUE</A><DD>
<DT id="7"><A HREF="#lbAF">ERRORS</A><DD>
<DT id="8"><A HREF="#lbAG">VERSIONS</A><DD>
<DT id="9"><A HREF="#lbAH">CONFORMING TO</A><DD>
<DT id="10"><A HREF="#lbAI">NOTES</A><DD>
<DL>
<DT id="11"><A HREF="#lbAJ">Glibc notes</A><DD>
</DL>
<DT id="12"><A HREF="#lbAK">SEE ALSO</A><DD>
<DT id="13"><A HREF="#lbAL">COLOPHON</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:32 GMT, March 31, 2021
</BODY>
</HTML>