-
-
Notifications
You must be signed in to change notification settings - Fork 32k
gh-101196: Make isdir/isfile/exists faster on Windows #101324
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
9a7d3d8
Make isdir/isfile/exists faster on Windows
mdboom a07f1e7
Fix doc syntax
mdboom 7765fea
Merge branch 'main' into win-isdir-fastpath
mdboom 684d683
Fix doc syntax
mdboom 781fa07
Update Lib/ntpath.py
mdboom dda7be7
Mark test as CPython-only
mdboom 565c2e1
Handle files correctly
mdboom 53b932b
Remove unused variable
mdboom f6ce580
Add islink
mdboom 88c8b25
Update CHANGELOG entry
mdboom 39beb86
Handle uncommon error cases
mdboom 9d4af5a
Fix drive test
mdboom 1030d8a
Update Lib/test/test_ntpath.py
mdboom be6b592
Use STAT and LSTAT macros
mdboom 0e465dc
Fix and add more tests
mdboom 8fff56b
Merge remote-tracking branch 'origin/win-isdir-fastpath' into win-isd…
mdboom dcb9513
Don't unnecessarily zero-out info
mdboom 0d2985d
Fix spelling of Win32
mdboom 19018dc
PEP7
mdboom 7583a1d
Reduce use of else
mdboom 30cf754
Remove variable declarations
mdboom c0991ec
Docstring improvements
mdboom 3400f07
No need for 'error' local variable
mdboom cb7cea3
Update generated code
mdboom 636886e
PEP7
mdboom 05c9165
Make docs consistent
mdboom 5818815
Merge branch 'main' into win-isdir-fastpath
mdboom ff6bca9
Revert docstrings to the equivalent Python ones
mdboom 6d48808
Revert docs changes
mdboom c7128bc
Move islink to genericpath.py
mdboom a72aba0
Regenerate clinic
mdboom aac93e4
Rename and reorganize - _isdir -> _path_isdir etc.
mdboom File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Handle files correctly
- Loading branch information
commit 565c2e1583d34a943bbc97ba4edcd04a3dc32aca
There are no files selected for viewing
This file contains hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason this is false is because a relative drive path like "C:" resolves to the working directory on the drive. Did you want to test a volume device path like
r'\\.\C:'
instead?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, yes. And this is exactly the thing that (erroneously) returns
True
without checking the error code fromGetFileInformationByHandleEx
.