summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorYoSTEALTH <35307184+YoSTEALTH@users.noreply.github.com>2020-05-27 21:32:22 (GMT)
committerGitHub <noreply@github.com>2020-05-27 21:32:22 (GMT)
commit76ef255bde772005bbd0761399b274c2240e61d3 (patch)
treed292b61c01295213a7baa5c27abf5658caa2df00 /Doc
parente4799b95945b44eb0e2eea26473db8e0a49ed0ee (diff)
downloadcpython-76ef255bde772005bbd0761399b274c2240e61d3.zip
cpython-76ef255bde772005bbd0761399b274c2240e61d3.tar.gz
cpython-76ef255bde772005bbd0761399b274c2240e61d3.tar.bz2
bpo-37129: Add os.RWF_APPEND flag for os.pwritev() (GH-20336)
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/os.rst23
1 files changed, 19 insertions, 4 deletions
diff --git a/Doc/library/os.rst b/Doc/library/os.rst
index 6d5fb31..275b2d3 100644
--- a/Doc/library/os.rst
+++ b/Doc/library/os.rst
@@ -1211,6 +1211,7 @@ or `the MSDN <https://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx>`_ on Windo
- :data:`RWF_DSYNC`
- :data:`RWF_SYNC`
+ - :data:`RWF_APPEND`
Return the total number of bytes actually written.
@@ -1228,8 +1229,8 @@ or `the MSDN <https://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx>`_ on Windo
.. data:: RWF_DSYNC
- Provide a per-write equivalent of the :data:`O_DSYNC` ``open(2)`` flag. This
- flag effect applies only to the data range written by the system call.
+ Provide a per-write equivalent of the :data:`O_DSYNC` :func:`os.open` flag.
+ This flag effect applies only to the data range written by the system call.
.. availability:: Linux 4.7 and newer.
@@ -1238,14 +1239,28 @@ or `the MSDN <https://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx>`_ on Windo
.. data:: RWF_SYNC
- Provide a per-write equivalent of the :data:`O_SYNC` ``open(2)`` flag. This
- flag effect applies only to the data range written by the system call.
+ Provide a per-write equivalent of the :data:`O_SYNC` :func:`os.open` flag.
+ This flag effect applies only to the data range written by the system call.
.. availability:: Linux 4.7 and newer.
.. versionadded:: 3.7
+.. data:: RWF_APPEND
+
+ Provide a per-write equivalent of the :data:`O_APPEND` :func:`os.open`
+ flag. This flag is meaningful only for :func:`os.pwritev`, and its
+ effect applies only to the data range written by the system call. The
+ *offset* argument does not affect the write operation; the data is always
+ appended to the end of the file. However, if the *offset* argument is
+ ``-1``, the current file *offset* is updated.
+
+ .. availability:: Linux 4.16 and newer.
+
+ .. versionadded:: 3.10
+
+
.. function:: read(fd, n)
Read at most *n* bytes from file descriptor *fd*.