-
Notifications
You must be signed in to change notification settings - Fork 392
shims::fs adding more fields to FileMetadata #4444
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
Conversation
2f2e7a7
to
32c0974
Compare
32c0974
to
c7b21c7
Compare
src/shims/unix/fs.rs
Outdated
@@ -1601,6 +1610,32 @@ impl FileMetadata { | |||
let modified = extract_sec_and_nsec(metadata.modified())?; | |||
|
|||
// FIXME: Provide more fields using platform specific methods. | |||
interp_ok(Ok(FileMetadata { mode, size, created, accessed, modified })) | |||
|
|||
#[cfg(unix)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rearrange this so that not all the fields need to be repeated everywhere. You can use cfg_select!
to insert let-bindings into the surrounding scope like here.
Thanks! I left a comment for reducing code duplication. :) @rustbot author |
Reminder, once the PR becomes ready for a review, use |
addressing, partially at least, FIXME comment and targetting unixes, adding device, user and group ids.
756e1eb
to
fe41b77
Compare
@rustbot ready |
Thanks! I did some more minor cleanup, that's easier than trying to explain it via comments. :) Please take a look, could be useful feedback for future PRs. |
addressing, partially at least, FIXME comment and
targetting unixes, adding device, user and group ids.
Fixes #4379