Struct rustc_std_workspace_std::fs::FileTimes
source · pub struct FileTimes(FileTimes);
🔬This is a nightly-only experimental API. (
file_set_times
)Expand description
Representation of the various timestamps on a file.
Tuple Fields§
§0: FileTimes
🔬This is a nightly-only experimental API. (
file_set_times
)Implementations§
source§impl FileTimes
impl FileTimes
sourcepub fn new() -> FileTimes
🔬This is a nightly-only experimental API. (file_set_times
)
pub fn new() -> FileTimes
file_set_times
)Create a new FileTimes
with no times set.
Using the resulting FileTimes
in File::set_times
will not modify any timestamps.
sourcepub fn set_accessed(self, t: SystemTime) -> FileTimes
🔬This is a nightly-only experimental API. (file_set_times
)
pub fn set_accessed(self, t: SystemTime) -> FileTimes
file_set_times
)Set the last access time of a file.
sourcepub fn set_modified(self, t: SystemTime) -> FileTimes
🔬This is a nightly-only experimental API. (file_set_times
)
pub fn set_modified(self, t: SystemTime) -> FileTimes
file_set_times
)Set the last modified time of a file.
Trait Implementations§
impl Copy for FileTimes
Auto Trait Implementations§
impl RefUnwindSafe for FileTimes
impl Send for FileTimes
impl Sync for FileTimes
impl Unpin for FileTimes
impl UnwindSafe for FileTimes
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more