Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-89727: Add pathlib.Path.fwalk() method #103566

Closed
wants to merge 3 commits into from

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.

None yet

2 participants