Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 545092b

Browse files
committed
Add comment about os.path.walk()'s behavior with symbolic links.
1 parent 3c668c1 commit 545092b

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Doc/lib/libposixpath.tex

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,4 +214,9 @@ \section{\module{os.path} ---
214214
avoid visiting certain parts of the tree. (The object referred to by
215215
\var{names} must be modified in place, using \keyword{del} or slice
216216
assignment.)
217+
218+
Note that symbolic links to directories are not treated as subdirectories,
219+
and that \var{walk} therefore will not visit them. To visit linked
220+
directories you must identify them with \var{os.path.islink(file)} and
221+
\var{os.path.isdir(file)}, and invoke \function{walk()} as necessary.
217222
\end{funcdesc}

0 commit comments

Comments
 (0)