pub struct OsFs;Expand description
Real filesystem adapter that delegates to std::fs.
Trait Implementations§
Source§impl Fs for OsFs
impl Fs for OsFs
Source§fn create_dir_all(&self, path: &Path) -> Result<(), SessionError>
fn create_dir_all(&self, path: &Path) -> Result<(), SessionError>
Create
path and all missing ancestors, like mkdir -p.Source§fn read(&self, path: &Path) -> Result<Vec<u8>, SessionError>
fn read(&self, path: &Path) -> Result<Vec<u8>, SessionError>
Read the entire contents of the file at
path.Source§fn append(&self, path: &Path, data: &[u8]) -> Result<(), SessionError>
fn append(&self, path: &Path, data: &[u8]) -> Result<(), SessionError>
Append
data to the file at path, creating it if absent. Like write,
it errors if the parent directory does not exist.Source§fn read_dir(&self, path: &Path) -> Result<Vec<PathBuf>, SessionError>
fn read_dir(&self, path: &Path) -> Result<Vec<PathBuf>, SessionError>
List immediate children (files and directories) of
path, sorted for
deterministic iteration.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