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

add os.pathExists; fix RFCs/issues/121 #17577

Closed
wants to merge 1 commit into from

Conversation

timotheecour
Copy link
Member

@timotheecour timotheecour commented Mar 29, 2021

do not review yet, I'm still trying to figure whether pathExists or pathKind is the most sensible API to add.

TODO

  • all Xexists procs (including this one) are wrong wrt permission errors, they return false when a file can't be stat'd due to permission error, instead they should either raise, or raise when a check bool flag is provided, or some other behavior
  • instead of pathExists, maybe we should have pathKind which could return:
{symLink, file, dir, device, none, permissionError}

note: PathComponent is IMO the wrong thing to return here, it's not what the OS provides directly, doesn't distinguish broken symlinks, doesn't have a category for device files etc

@stale
Copy link

stale bot commented Mar 31, 2022

This pull request has been automatically marked as stale because it has not had recent activity. If you think it is still a valid PR, please rebase it on the latest devel; otherwise it will be closed. Thank you for your contributions.

@stale stale bot added the stale Staled PR/issues; remove the label after fixing them label Mar 31, 2022
@stale stale bot closed this May 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Staled PR/issues; remove the label after fixing them
Projects
None yet
Development

Successfully merging this pull request may close these issues.

os module should have an "exists" function
1 participant