pub struct StdFiles;Expand description
FileOps on the file system.
Trait Implementations§
impl Copy for StdFiles
Source§impl FileOps for StdFiles
impl FileOps for StdFiles
fn read(&self, path: &Path) -> Result<Vec<u8>>
Source§fn write(&self, path: &Path, data: &[u8]) -> Result<()>
fn write(&self, path: &Path, data: &[u8]) -> Result<()>
Write
data to path atomically, creating its folder.Source§fn remove(&self, path: &Path) -> Result<()>
fn remove(&self, path: &Path) -> Result<()>
Remove a file; removing a missing file is not an error.
Source§fn list(&self, dir: &Path) -> Vec<(String, SystemTime)>
fn list(&self, dir: &Path) -> Vec<(String, SystemTime)>
Files directly in
dir: (file name, modified time), sorted by name.fn is_file(&self, path: &Path) -> bool
Auto Trait Implementations§
impl Forget for StdFiles
impl Freeze for StdFiles
impl Move for StdFiles
impl RefUnwindSafe for StdFiles
impl Send for StdFiles
impl Sync for StdFiles
impl Unpin for StdFiles
impl UnsafeUnpin for StdFiles
impl UnwindSafe for StdFiles
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