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

isjunction for checking if a given path is a junction #99547

Closed
csm10495 opened this issue Nov 16, 2022 · 2 comments
Closed

isjunction for checking if a given path is a junction #99547

csm10495 opened this issue Nov 16, 2022 · 2 comments
Labels
3.12 bugs and security fixes OS-windows topic-pathlib type-feature A feature request or enhancement

Comments

@csm10495
Copy link
Contributor

csm10495 commented Nov 16, 2022

Feature or enhancement

(A clear and concise description of your proposal.)

Pitch

I’m proposing we add a isjunction method to os.path and a is_junction method to pathlib.Path. Both would return True if the given path is a junction. On Posix the API would exist, but would always return False as this tends to be a Windows-only thing.

We have similar logic to check for concepts like ismount, islink, etc. So i figure this would fit in.

Previous discussion

See https://discuss.python.org/t/add-mechanism-to-check-if-a-path-is-a-junction/20952 and then lower down https://mail.python.org/archives/list/python-ideas@python.org/thread/KQ7AELTQRLYOXD434GQ2AHNDD23C4CYG/

There didn't seem to be any hard -1s to this proposal.

Linked PRs

@brettcannon
Copy link
Member

Can this issue be closed since #99548 got merged?

@csm10495
Copy link
Contributor Author

👍 Closing out. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.12 bugs and security fixes OS-windows topic-pathlib type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

4 participants