pub trait FileSync {
// Required methods
fn fsync(&self) -> Result<()>;
fn fdatasync(&self) -> Result<()>;
}
Expand description
A trait for flushing the contents of a file to disk.
This is equivalent to File’s sync_all
and sync_data
methods, but wrapped in a trait so that
it can be implemented for other types.