pub struct OsFs;Expand description
Filesystem implementation that delegates to std::fs.
Every io::Error is wrapped with the path that caused it via
DodotError::Fs.
Implementations§
Trait Implementations§
Source§impl Fs for OsFs
impl Fs for OsFs
Source§fn stat(&self, path: &Path) -> Result<FsMetadata>
fn stat(&self, path: &Path) -> Result<FsMetadata>
Returns metadata for the path, following symlinks.
Source§fn lstat(&self, path: &Path) -> Result<FsMetadata>
fn lstat(&self, path: &Path) -> Result<FsMetadata>
Returns metadata for the path without following symlinks.
Source§fn open_read(&self, path: &Path) -> Result<Box<dyn Read + Send + Sync>>
fn open_read(&self, path: &Path) -> Result<Box<dyn Read + Send + Sync>>
Opens the file for reading in a streaming fashion. Read more
Source§fn read_to_string(&self, path: &Path) -> Result<String>
fn read_to_string(&self, path: &Path) -> Result<String>
Reads the entire file as a UTF-8 string.
Source§fn write_file(&self, path: &Path, contents: &[u8]) -> Result<()>
fn write_file(&self, path: &Path, contents: &[u8]) -> Result<()>
Writes
contents to path, creating or truncating the file.Source§fn symlink(&self, original: &Path, link: &Path) -> Result<()>
fn symlink(&self, original: &Path, link: &Path) -> Result<()>
Creates a symbolic link at
link pointing to original.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.
Source§fn is_symlink(&self, path: &Path) -> bool
fn is_symlink(&self, path: &Path) -> bool
Returns
true if path is a symlink (does not follow).impl Copy for OsFs
Auto Trait Implementations§
impl Freeze for OsFs
impl RefUnwindSafe for OsFs
impl Send for OsFs
impl Sync for OsFs
impl Unpin for OsFs
impl UnsafeUnpin for OsFs
impl UnwindSafe for OsFs
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