pub struct FileTimes(_);
🔬This is a nightly-only experimental API. (
file_set_times
#98245)Expand description
文件上各种时间戳的表示。
Implementations§
source§impl FileTimes
impl FileTimes
sourcepub fn new() -> Self
🔬This is a nightly-only experimental API. (file_set_times
#98245)
pub fn new() -> Self
file_set_times
#98245)创建一个没有设置时间的新 FileTimes
。
在 File::set_times
中使用生成的 FileTimes
不会修改任何时间戳。
sourcepub fn set_accessed(self, t: SystemTime) -> Self
🔬This is a nightly-only experimental API. (file_set_times
#98245)
pub fn set_accessed(self, t: SystemTime) -> Self
file_set_times
#98245)设置文件的最后访问时间。
sourcepub fn set_modified(self, t: SystemTime) -> Self
🔬This is a nightly-only experimental API. (file_set_times
#98245)
pub fn set_modified(self, t: SystemTime) -> Self
file_set_times
#98245)设置文件的最后修改时间。
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
🔬This is a nightly-only experimental API. (
file_set_times
#98245)设置文件的创建时间。
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
从拥有的值中借用。 Read more