Skip to content

Added libstd::io::fs::access() #19605

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

Closed
wants to merge 1 commit into from
Closed

Added libstd::io::fs::access() #19605

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Dec 6, 2014

As I was missing the posix access() function I added it to libstd::io::fs taking the existing functions there as an example.
I added the corresponding wrapper functions to the windows and unix libraries and tested it on windows x86 and linux x86_64.
Rebased to master and ran make check with no errors.

@alexcrichton
Copy link
Member

Right now we're in the process of stabilizing the std::io::fs module, and I think that we may want to hold off on this for a few reasons at the moment:

  • The permissions model of std::io::fs will likely change to a more platform-agnostic model than permission bits as it's not really what Windows does (only unix).
  • In general we do not want to be calling MSVCRT functions but instead calling native Windows API functions.
  • We're moving away from Unix-centric names to more descriptive and Windows-friendly names, so this may not want to be called just access.

Functionality such as this is likely to be provided unconditionally as part of the std::os::unix module at some point (raw platform-specific APIs), but it will likely not live in std::io::fs as-is for now. While we're hammering out these issues with the API, I'm going to close this for now, but I'll be sure to cc you when we open the std::io RFC so you can comment! Thanks for the PR regardless!

lnicola pushed a commit to lnicola/rust that referenced this pull request Apr 28, 2025
minor: Fix signature of libc memory usage function on Linux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant