forked from python/cpython
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When a path object is generated by `PathBase.iterdir()`, then its `_info` attribute now stores a `os.DirEntry`-like object that can be used to query the file type. This removes any need for a `_scandir()` method. Currently the `_info` attribute is private and only guaranteed to be populated in paths from `iterdir()`. Later on, I'm hoping to rename it to `info` and ensure that it's populated for all kinds of paths (this probably involves adding a `pathlib.FileInfo` class.) In the pathlib ABCs, `info` will replace `stat()` as the lowest-level abstract file status querying mechanism.
- Loading branch information
1 parent
31c9f3c
commit 6046a27
Showing
4 changed files
with
60 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters