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 try_exists function as wrapper over std::path::Path::try_exists #43

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kanpov
Copy link

@kanpov kanpov commented Dec 17, 2024

No description provided.

@kanpov
Copy link
Author

kanpov commented Dec 17, 2024

@notgull ping

@kanpov
Copy link
Author

kanpov commented Dec 18, 2024

We can replicate behavior of the MSRV-incompatible std::fs::exists manually, but this approach is a simpler one that just uses std::path::Path::try_exists instead. This is what Tokio's tokio::fs::try_exists does, so I'd say it'd be a reasonable expectation for async_fs to mirror that functionality.

@taiki-e
Copy link
Collaborator

taiki-e commented Dec 18, 2024

Having try_* without the non-try_ variant sounds odd.

See also the stabilization report of std::fs::exists in rust-lang/rust#83186 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants