Repository navigation
Tracking Issue for feature(file_set_times): FileTimes and File::set_times #98245
Description
Activity
- addedT-libs-api[DEPRECATED; DO NOT USE][DEPRECATED; DO NOT USE]C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFC
on Jun 19, 2022 I wonder if it would be good to have a
file.set_last_modified(time)short-hand forfile.set_times(FileTimes::new().set_modified(time)).FileTimesnicely allows platforms to have aFileTimesExttrait to add more times, but it's a bit verbose for simple use cases.@m-ou-se No fundamental objection, though I don't think we should provide an alias for
accessed(less common to set in isolation, and if we had both people might be tempted to call both rather than making one call toset_times).Also, I'd probably call it
set_modifiedfor symmetry with the various uses ofmodified.@m-ou-se Done.
On Unix-family platforms, there's a mechanism for setting a timestamp to the current time (
UTIME_NOW), which doesn't appear to be covered in this API. One can get the same effect by using a timestamp ofSystemTime::now(); is that fast enough? I expect it is on Linux with the vDSO, but I don't know about other platforms.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?
Reacted by ipkpjersi, C0D3 M4513R and Daniel FaustReacted by ipkpjersi, Hugh Mandalidis and Chrisis it possible to at
createdtimes here as well?
I know it exists in Windows, not sure about Unix but i would expect it's a thing there as well.Reacted by Maartenstatxis needed for birth time support, and its getting more and more support, but it still pretty new as these things go. https://www.phoronix.com/news/FAT-File-Creation-Birth-5.19 for instance adding support for FAT32 support.@sargun This seems to be operating on the FD - does NOFOLLOW make any sense when not operating with paths?
10 remaining items
- addedproposed-final-comment-periodProposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off.Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.This issue / PR is in PFCP or FCP with a disposition to merge it.
on Sep 6, 2023 - addedfinal-comment-periodIn the final comment period and will be merged soon unless new substantive objections are raised.In the final comment period and will be merged soon unless new substantive objections are raised.and removedproposed-final-comment-periodProposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off.Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off.
on Oct 5, 2023 🔔 This is now entering its final comment period, as per the review above. 🔔
Reacted by Josh Triplett and Chris- addedfinished-final-comment-periodThe final comment period is finished for this PR / Issue.The final comment period is finished for this PR / Issue.to-announceAnnounce this issue on triage meetingAnnounce this issue on triage meetingand removedfinal-comment-periodIn the final comment period and will be merged soon unless new substantive objections are raised.In the final comment period and will be merged soon unless new substantive objections are raised.
on Oct 15, 2023 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.
- removedto-announceAnnounce this issue on triage meetingAnnounce this issue on triage meeting
on Oct 19, 2023 FCP is completed! Anyone feel like making a stabilization PR?
- added a commit that references this issue
on Oct 31, 2023 Closing this issue since stabilization PR is finished.
Feature gate:
#![feature(file_set_times)]This is a tracking issue for setting file accesses/modification timestamps via the
File::set_timesfunction and associatedFileTimesstructure.Public API
Steps / History
FileTimeson apple and windows #109773