pub trait FileExt {
// Required methods
fn copy_to(&self, to: &File) -> Result<u64>;
fn update_timestamps(&self) -> Result<()>;
fn pread_exact(&self, buf: &mut [u8], position: usize) -> Result<()>;
}
Expand description
Helper functions for std::fs::File
Required Methods§
Sourcefn copy_to(&self, to: &File) -> Result<u64>
👎Deprecated: Use std::io::copy instead
fn copy_to(&self, to: &File) -> Result<u64>
Copy the entire contents of self
to to
. This uses operating system
specific fast paths if available.
Sourcefn update_timestamps(&self) -> Result<()>
fn update_timestamps(&self) -> Result<()>
Update timestamps (both access and modification) to the current time.