summaryrefslogtreecommitdiffstats
path: root/Doc/library/os.rst
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2012-06-24 10:55:33 (GMT)
committerGeorg Brandl <georg@python.org>2012-06-24 10:55:33 (GMT)
commit306336bcdaf886c10df9c1b46886d5f0cddcaa69 (patch)
tree2f866c5adddc259acf2fb27fe8fc5d589f9d5d7a /Doc/library/os.rst
parent8ccadaafe637d265a1e286e0261e3231ebcc678d (diff)
downloadcpython-306336bcdaf886c10df9c1b46886d5f0cddcaa69.zip
cpython-306336bcdaf886c10df9c1b46886d5f0cddcaa69.tar.gz
cpython-306336bcdaf886c10df9c1b46886d5f0cddcaa69.tar.bz2
Closes #15161: add support for giving path as a fd for truncate() and pathconf().
Diffstat (limited to 'Doc/library/os.rst')
-rw-r--r--Doc/library/os.rst12
1 files changed, 10 insertions, 2 deletions
diff --git a/Doc/library/os.rst b/Doc/library/os.rst
index a1e174d..0729a94 100644
--- a/Doc/library/os.rst
+++ b/Doc/library/os.rst
@@ -724,6 +724,8 @@ as internal buffering of data.
included in ``pathconf_names``, an :exc:`OSError` is raised with
:const:`errno.EINVAL` for the error number.
+ From Python 3.3, this is equivalent to ``os.pathconf(fd, name)``.
+
Availability: Unix.
@@ -758,8 +760,9 @@ as internal buffering of data.
.. function:: ftruncate(fd, length)
- Truncate the file corresponding to file descriptor *fd*, so that it is at most
- *length* bytes in size.
+ Truncate the file corresponding to file descriptor *fd*, so that it is at
+ most *length* bytes in size. From Python 3.3, this is equivalent to
+ ``os.truncate(fd, length)``.
Availability: Unix.
@@ -1622,6 +1625,9 @@ features:
included in ``pathconf_names``, an :exc:`OSError` is raised with
:const:`errno.EINVAL` for the error number.
+ This function can support :ref:`specifying an open file descriptor
+ <path_fd>`.
+
Availability: Unix.
@@ -2054,6 +2060,8 @@ features:
Truncate the file corresponding to *path*, so that it is at most
*length* bytes in size.
+ This function can support :ref:`specifying a file descriptor <path_fd>`.
+
Availability: Unix.
.. versionadded:: 3.3