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 missing File stats for std::fs::Metadata #23023

Closed
ghost opened this issue Mar 4, 2015 · 4 comments
Closed

Add missing File stats for std::fs::Metadata #23023

ghost opened this issue Mar 4, 2015 · 4 comments

Comments

@ghost
Copy link

ghost commented Mar 4, 2015

Currently, the Metadata type does not support checking for other different kinds of files identified by a call to stat, like symlinks (softlinks?), block devices, and named pipes, as shown from the std::old_io::FileType enum and getting the file stats, like uid, gid, rdev, etc, like with std::old_io::UnstableFileStat.

@nagisa
Copy link
Member

nagisa commented Mar 4, 2015

Sadly, the std::fs API has to be cross platform, and Windows does not expose most of the information you listed meaningfully.

You’ll have to use unix specific functions when these come around to get things like uid, gid, nlink, mode etc.

@ghost
Copy link
Author

ghost commented Mar 4, 2015

Could there be a unix trait extension for exposing such stats?

@nagisa
Copy link
Member

nagisa commented Mar 4, 2015

It is very likely there will be one. We just didn't even start working on
the platform specific apis yet.
2015/03/04 12:22 "guruverse" notifications@github.com:

Could there be a unix trait extension for exposing such stats?


Reply to this email directly or view it on GitHub
#23023 (comment).

@alexcrichton
Copy link
Member

Thanks for the issue! I'm going to start collecting possible std::fs extensions into a tracking issue in the RFC repo to make sure we keep everything in one place. I made sure to include this in there though!

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

No branches or pull requests

2 participants