-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Tracking Issue for feature(file_set_times)
: FileTimes
and File::set_times
#98245
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
I wonder if it would be good to have a |
@m-ou-se No fundamental objection, though I don't think we should provide an alias for Also, I'd probably call it |
@m-ou-se Done. |
On Unix-family platforms, there's a mechanism for setting a timestamp to the current time ( |
…htriplett Improve `File::set_times` error handling Makes `File::set_times` return an error if the `SystemTime` cannot fit into the required type instead of panicking in `FileTimes::set_{accessed,modified}`. Also makes `File::set_times` return an error on Windows if either of the passed times are `0xFFFF_FFFF_FFFF_FFFF`, as [the documentation for `SetFileTime`](https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-setfiletime) states that this will prevent operations on the file handle from updating the corresponding file time instead of setting the corresponding file time to that value. Tracking issue: rust-lang#98245
One thing I noticed is that there's no way to set the AT_SYMLINK_NOFOLLOW flag for this call. We might want to expose that. |
Is there a planned stabilization time for this feature? |
is it possible to at |
@sargun This seems to be operating on the FD - does NOFOLLOW make any sense when not operating with paths? |
…s, r=Amanieu Add creation time support to `FileTimes` on apple and windows Adds support for setting file creation times on platforms which support changing it directly (currently only Apple and Windows). Based on top of rust-lang#110093 (which was split from this PR). ACP: rust-lang/libs-team#199 (currently still in progress) Tracking issue: rust-lang#98245 `@rustbot` label +T-libs-api -T-libs
…s, r=Amanieu Add creation time support to `FileTimes` on apple and windows Adds support for setting file creation times on platforms which support changing it directly (currently only Apple and Windows). Based on top of rust-lang#110093 (which was split from this PR). ACP: rust-lang/libs-team#199 (currently still in progress) Tracking issue: rust-lang#98245 `@rustbot` label +T-libs-api -T-libs
…riplett Add 64-bit `time_t` support on 32-bit glibc Linux to `set_times` Add support to `set_times` for 64-bit `time_t` on 32-bit glibc Linux platforms which have a 32-bit `time_t`. Split from rust-lang#109773. Tracking issue: rust-lang#98245
… r=Amanieu Add creation time support to `FileTimes` on apple and windows Adds support for setting file creation times on platforms which support changing it directly (currently only Apple and Windows). Based on top of rust-lang#110093 (which was split from this PR). ACP: rust-lang/libs-team#199 (currently still in progress) Tracking issue: rust-lang#98245 `@rustbot` label +T-libs-api -T-libs
@sunfishcode Might make sense to have an extension for passing |
This has been around for quite a while now, and seems to work as advertised. Shall we stabilize it? @rfcbot merge |
Team member @joshtriplett has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
🔔 This is now entering its final comment period, as per the review above. 🔔 |
The final comment period, with a disposition to merge, as per the review above, is now complete. As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed. This will be merged soon. |
FCP is completed! Anyone feel like making a stabilization PR? |
Approved via FCP in rust-lang#98245 .
…=workingjubilee Stabilize `file_set_times` Approved via FCP in rust-lang#98245 .
Closing this issue since stabilization PR is finished. |
Uh oh!
There was an error while loading. Please reload this page.
Feature gate:
#![feature(file_set_times)]
This is a tracking issue for setting file accesses/modification timestamps via the
File::set_times
function and associatedFileTimes
structure.Public API
Steps / History
FileTimes
on apple and windows #109773The text was updated successfully, but these errors were encountered: