pub struct FileTimes(/* private fields */);
Expand description
Representation of the various timestamps on a file.
Implementations§
source§impl FileTimes
impl FileTimes
sourcepub fn new() -> Self
pub fn new() -> Self
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) -> Self
pub fn set_accessed(self, t: SystemTime) -> Self
Set the last access time of a file.
sourcepub fn set_modified(self, t: SystemTime) -> Self
pub fn set_modified(self, t: SystemTime) -> Self
Set the last modified time of a file.
Trait Implementations§
source§impl FileTimesExt for FileTimes
Available on Windows only.
impl FileTimesExt for FileTimes
Available on Windows only.
source§fn set_created(self, t: SystemTime) -> Self
fn set_created(self, t: SystemTime) -> Self
Set the creation time of a file.
source§impl FileTimesExt for FileTimes
impl FileTimesExt for FileTimes
source§fn set_created(self, t: SystemTime) -> Self
fn set_created(self, t: SystemTime) -> Self
Set the creation time of a file.
impl Copy for FileTimes
Auto Trait Implementations§
impl Freeze for FileTimes
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