summaryrefslogtreecommitdiffstats
path: root/Doc/library/os.rst
diff options
context:
space:
mode:
authorLarry Hastings <larry@hastings.org>2012-06-25 11:49:05 (GMT)
committerLarry Hastings <larry@hastings.org>2012-06-25 11:49:05 (GMT)
commitc48fe98a7c3bb48fd689088baf3fedf9da7a8c70 (patch)
tree84126650691cd047e326368655e8fe5a9bd96101 /Doc/library/os.rst
parent2a193a818a3a1e7ea8b184a068f39277c3468598 (diff)
downloadcpython-c48fe98a7c3bb48fd689088baf3fedf9da7a8c70.zip
cpython-c48fe98a7c3bb48fd689088baf3fedf9da7a8c70.tar.gz
cpython-c48fe98a7c3bb48fd689088baf3fedf9da7a8c70.tar.bz2
Issue #15177: Added dir_fd parameter to os.fwalk().
Diffstat (limited to 'Doc/library/os.rst')
-rw-r--r--Doc/library/os.rst7
1 files changed, 5 insertions, 2 deletions
diff --git a/Doc/library/os.rst b/Doc/library/os.rst
index 0b6ab24..6d18300 100644
--- a/Doc/library/os.rst
+++ b/Doc/library/os.rst
@@ -2211,18 +2211,21 @@ features:
os.rmdir(os.path.join(root, name))
-.. function:: fwalk(top, topdown=True, onerror=None, followlinks=False)
+.. function:: fwalk(top='.', topdown=True, onerror=None, followlinks=False, *, dir_fd=None)
.. index::
single: directory; walking
single: directory; traversal
This behaves exactly like :func:`walk`, except that it yields a 4-tuple
- ``(dirpath, dirnames, filenames, dirfd)``.
+ ``(dirpath, dirnames, filenames, dirfd)``, and it supports ``dir_fd``.
*dirpath*, *dirnames* and *filenames* are identical to :func:`walk` output,
and *dirfd* is a file descriptor referring to the directory *dirpath*.
+ This function always supports :ref:`paths relative to directory descriptors
+ <dir_fd>`.
+
.. note::
Since :func:`fwalk` yields file descriptors, those are only valid until