Charles-François Natali <neolo...@free.fr> added the comment:
> It would be nice if the documentation of fwalk() explained why you would
> want to use it over walk().
How does the attached patch look?
----------
Added file: http://bugs.python.org/file25550/fwalk-doc.diff
_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue13734>
_______________________________________
diff --git a/Doc/library/os.rst b/Doc/library/os.rst
--- a/Doc/library/os.rst
+++ b/Doc/library/os.rst
@@ -2356,6 +2356,9 @@
*dirpath*, *dirnames* and *filenames* are identical to :func:`walk` output,
and *dirfd* is a file descriptor referring to the directory *dirpath*.
+ It can be used, for example, to walk a directory tree in a way that is
+ immune to symlink attacks.
+
.. note::
Since :func:`fwalk` yields file descriptors, those are only valid until
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com