pub struct FileTimes(FileTimes);
Expand description
Representation of the various timestamps on a file.
Tuple Fields§
§0: FileTimes
Implementations§
Source§impl FileTimes
impl FileTimes
1.75.0 · Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new FileTimes
with no times set.
Using the resulting FileTimes
in File::set_times
will not modify any timestamps.
1.75.0 · Sourcepub fn set_accessed(self, t: SystemTime) -> Self
pub fn set_accessed(self, t: SystemTime) -> Self
Set the last access time of a file.
1.75.0 · 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 AsInnerMut<FileTimes> for FileTimes
impl AsInnerMut<FileTimes> for FileTimes
fn as_inner_mut(&mut self) -> &mut FileTimes
1.75.0 · Source§impl FileTimesExt for FileTimes
Available on Apple only.
impl FileTimesExt for FileTimes
Available on Apple only.
Source§fn set_created(self, t: SystemTime) -> Self
fn set_created(self, t: SystemTime) -> Self
Set the creation time of a file.
1.75.0 · 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.
impl Copy for FileTimes
impl Sealed 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> SizedTypeProperties for T
impl<T> SizedTypeProperties for T
Source§#[doc(hidden)] const IS_ZST: bool = _
#[doc(hidden)] const IS_ZST: bool = _
🔬This is a nightly-only experimental API. (
sized_type_properties
)Source§#[doc(hidden)] const LAYOUT: Layout = _
#[doc(hidden)] const LAYOUT: Layout = _
🔬This is a nightly-only experimental API. (
sized_type_properties
)Source§#[doc(hidden)] const MAX_SLICE_LEN: usize = _
#[doc(hidden)] const MAX_SLICE_LEN: usize = _
🔬This is a nightly-only experimental API. (
sized_type_properties
)The largest safe length for a
[Self]
. Read more