summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorBrian Curtin <brian@python.org>2011-11-07 22:09:20 (GMT)
committerBrian Curtin <brian@python.org>2011-11-07 22:09:20 (GMT)
commit569b49432002a4750640c4b3883187796f2f5036 (patch)
treeac72250d790f11695d9aa8b30ec7c374359a60a2 /Doc
parent7ef53ef916453fc2d907ae783aa0bd5801aa5575 (diff)
downloadcpython-569b49432002a4750640c4b3883187796f2f5036.zip
cpython-569b49432002a4750640c4b3883187796f2f5036.tar.gz
cpython-569b49432002a4750640c4b3883187796f2f5036.tar.bz2
Fix #13327. utimensat now has the atime and mtime arguments set as optional,
defaulting to None like the other utimes family members. It now accepts keyword arguments because, unlike other other functions in the family, it has a `flags` value at the end of the argument list (which retains its 0 default).
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/os.rst8
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/library/os.rst b/Doc/library/os.rst
index acd525b..92b24ac 100644
--- a/Doc/library/os.rst
+++ b/Doc/library/os.rst
@@ -1285,17 +1285,17 @@ as internal buffering of data.
.. versionadded:: 3.3
-.. function:: utimensat(dirfd, path, (atime_sec, atime_nsec), (mtime_sec, mtime_nsec), flags)
- utimensat(dirfd, path, None, None, flags)
+.. function:: utimensat(dirfd, path[, atime=(atime_sec, atime_nsec), mtime=(mtime_sec, mtime_nsec), flags=0])
Updates the timestamps of a file with nanosecond precision.
- The second form sets *atime* and *mtime* to the current time.
+ The *atime* and *mtime* tuples default to ``None``, which sets those
+ values to the current time.
If *atime_nsec* or *mtime_nsec* is specified as :data:`UTIME_NOW`, the corresponding
timestamp is updated to the current time.
If *atime_nsec* or *mtime_nsec* is specified as :data:`UTIME_OMIT`, the corresponding
timestamp is not updated.
If *path* is relative, it is taken as relative to *dirfd*.
- *flags* is optional and may be 0 or :data:`AT_SYMLINK_NOFOLLOW`.
+ *flags* is optional and may be 0 (the default) or :data:`AT_SYMLINK_NOFOLLOW`.
If *path* is relative and *dirfd* is the special value :data:`AT_FDCWD`, then *path*
is interpreted relative to the current working directory.