-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
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 RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.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.finished-final-comment-periodThe final comment period is finished for this PR / Issue.The final comment period is finished for this PR / Issue.
Description
Feature gate: #![feature(file_set_times)]
This is a tracking issue for setting file accesses/modification timestamps via the File::set_times
function and associated FileTimes
structure.
Public API
// std::fs
#[derive(Copy, Clone, Debug, Default)]
pub struct FileTimes { /* ... */ };
impl FileTimes {
pub fn new() -> Self;
pub fn set_accessed(self, t: SystemTime) -> Self;
pub fn set_modified(self, t: SystemTime) -> Self;
}
impl File {
pub fn set_times(&self, times: FileTimes) -> std::io::Result<()>;
pub fn set_modified(&self, t: SystemTime) -> std::io::Result<()>;
}
// std::os::ios::fs
// std::os::macos::fs
// std::os::watchos::fs
// std::os::windows::fs
pub trait FileTimesExt: Sealed {
fn set_created(self, t: SystemTime) -> Self;
}
impl FileTimesExt for std::fs::FileTimes;
Steps / History
- Implementation: Support setting file accessed/modified timestamps #98246
- Add creation time support to
FileTimes
on apple and windows #109773 - Final comment period (FCP)
- Stabilization PR
Metadata
Metadata
Assignees
Labels
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 RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.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.finished-final-comment-periodThe final comment period is finished for this PR / Issue.The final comment period is finished for this PR / Issue.