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

Proposal: ability to set btime #70

Open
mitchellmebane opened this issue May 31, 2021 · 3 comments
Open

Proposal: ability to set btime #70

mitchellmebane opened this issue May 31, 2021 · 3 comments

Comments

@mitchellmebane
Copy link
Contributor

mitchellmebane commented May 31, 2021

Some OS/filesystem combos support file birth/creation times as a user-modifiable attribute. Windows and macOS, at least, are in this boat, and possibly also FreeBSD and NetBSD.

Although Linux added support for reading btimes with statx in 4.11, they seem to have decided that it is only for internal filesystem use, and thus should not be settable by normal means. There was a proposal to come up with a standard xattr for logical file creation time, but I haven't been able to find any info on whether that ever happened.

If this is acceptable, what should the API look like? I could just add a btime parameter to all of the set_file_times/set_file_handle_times methods, and then return an io::Error or panic for unimplemented platforms.

@alexcrichton
Copy link
Owner

Sorry I don't know enough about btime and various other bits and pieces to know best how to bind the API. If it can be set all at once on some platforms though it seems reasonable to have a function that takes all the parameters though.

@mitchellmebane
Copy link
Contributor Author

Alright, I'll play around with it a bit and see if I can come up with a workable proposal.

@czy-29
Copy link

czy-29 commented Aug 28, 2022

F.Y.I. #84

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

3 participants