pub struct OsFileSystem;Trait Implementations§
Source§impl FileSystem for OsFileSystem
impl FileSystem for OsFileSystem
Source§fn read_to_string(&self, path: &Path) -> Result<String>
fn read_to_string(&self, path: &Path) -> Result<String>
Reads the entire contents of a file into a string. Read more
Source§fn write_all(&self, path: &Path, contents: &[u8]) -> Result<()>
fn write_all(&self, path: &Path, contents: &[u8]) -> Result<()>
Writes a slice of bytes to a file, creating the file if it does not exist. Read more
Source§fn create_dir_all(&self, path: &Path) -> Result<()>
fn create_dir_all(&self, path: &Path) -> Result<()>
Creates a directory and all of its parent components if they are missing. Read more
Source§fn remove_file(&self, path: &Path) -> Result<()>
fn remove_file(&self, path: &Path) -> Result<()>
Removes a file from the filesystem. Read more
Source§fn remove_dir_all(&self, path: &Path) -> Result<()>
fn remove_dir_all(&self, path: &Path) -> Result<()>
Removes a directory and all of its contents. Read more
Source§fn is_dir(&self, path: &Path) -> bool
fn is_dir(&self, path: &Path) -> bool
Returns
true if the path exists and is pointing at a directory.Source§fn is_file(&self, path: &Path) -> bool
fn is_file(&self, path: &Path) -> bool
Returns
true if the path exists and is pointing at a regular file.Source§fn canonicalize(&self, path: &Path) -> Result<PathBuf>
fn canonicalize(&self, path: &Path) -> Result<PathBuf>
Returns the canonical, absolute form of the path with all intermediate components normalized. Read more
Auto Trait Implementations§
impl Freeze for OsFileSystem
impl RefUnwindSafe for OsFileSystem
impl Send for OsFileSystem
impl Sync for OsFileSystem
impl Unpin for OsFileSystem
impl UnsafeUnpin for OsFileSystem
impl UnwindSafe for OsFileSystem
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