pub struct RealFilesystem;Expand description
Production implementation of Filesystem that delegates to std::fs.
Trait Implementations§
Source§impl Filesystem for RealFilesystem
impl Filesystem for RealFilesystem
fn exists(&self, path: &Path) -> bool
fn is_dir(&self, path: &Path) -> bool
fn is_file(&self, path: &Path) -> bool
fn read_to_string(&self, path: &Path) -> Result<String>
fn read(&self, path: &Path) -> Result<Vec<u8>>
fn write(&self, path: &Path, contents: &str) -> Result<()>
fn write_bytes(&self, path: &Path, contents: &[u8]) -> Result<()>
fn create_dir_all(&self, path: &Path) -> Result<()>
fn copy_file(&self, src: &Path, dest: &Path) -> Result<()>
Source§fn rename(&self, from: &Path, to: &Path) -> Result<()>
fn rename(&self, from: &Path, to: &Path) -> Result<()>
Atomically rename
from to to, replacing to if it already exists.fn remove_file(&self, path: &Path) -> Result<()>
fn remove_dir_all(&self, path: &Path) -> Result<()>
fn read_dir(&self, path: &Path) -> Result<Vec<DirEntry>>
fn canonicalize(&self, path: &Path) -> Result<PathBuf>
Auto Trait Implementations§
impl Freeze for RealFilesystem
impl RefUnwindSafe for RealFilesystem
impl Send for RealFilesystem
impl Sync for RealFilesystem
impl Unpin for RealFilesystem
impl UnsafeUnpin for RealFilesystem
impl UnwindSafe for RealFilesystem
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