Skip to content

Conversation

barneygale
Copy link
Contributor

@barneygale barneygale commented Apr 15, 2023

Add pathlib.Path.fwalk() method, which behaves exactly like Path.walk() except that it yields a 4-tuple (dirpath, dirnames, filenames, dirfd), and it supports a dir_fd.

This method provides safety from symlink attacks when walking directory trees; this is important for implementing functionality such as rmtree().

Add `pathlib.Path.fwalk()` method, which behaves exactly like `Path.walk()`
except that it yields a 4-tuple `(dirpath, dirnames, filenames, dirfd)`,
and it supports a `dir_fd`.

This method provides safety from symlink attacks when walking directory
trees; this is important for implementing functionality such as `rmtree()`.
@barneygale
Copy link
Contributor Author

Withdrawing this PR - it's out of date, and I'd like to keep the Path API stable until PathBase is made public (see #110109)

@barneygale barneygale closed this Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants