pub struct RealFileSystem;Expand description
Reads and writes the actual filesystem. Stateless, so it is cheap to share across the worker thread and any future services that need it.
Implementations§
Trait Implementations§
Source§impl Clone for RealFileSystem
impl Clone for RealFileSystem
Source§fn clone(&self) -> RealFileSystem
fn clone(&self) -> RealFileSystem
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for RealFileSystem
Source§impl Debug for RealFileSystem
impl Debug for RealFileSystem
Source§impl Default for RealFileSystem
impl Default for RealFileSystem
Source§fn default() -> RealFileSystem
fn default() -> RealFileSystem
Returns the “default value” for a type. Read more
Source§impl FileSystemService for RealFileSystem
impl FileSystemService for RealFileSystem
Source§fn read_dir(&self, path: &Path) -> FsResult<Vec<DirEntryInfo>>
fn read_dir(&self, path: &Path) -> FsResult<Vec<DirEntryInfo>>
List one directory level. Does not recurse — the tree is lazy (ADR-0005 §2). Read more
fn read_file(&self, path: &Path) -> FsResult<Vec<u8>>
Source§fn create_file(&self, path: &Path) -> FsResult<()>
fn create_file(&self, path: &Path) -> FsResult<()>
Create an empty file. Errors with
FsError::AlreadyExists rather than truncating.Source§fn write_file(&self, path: &Path, contents: &[u8]) -> FsResult<()>
fn write_file(&self, path: &Path, contents: &[u8]) -> FsResult<()>
Replace a file’s contents, creating it if absent. Read more
Source§fn create_dir(&self, path: &Path) -> FsResult<()>
fn create_dir(&self, path: &Path) -> FsResult<()>
Create a directory, including missing parents.
fn rename(&self, from: &Path, to: &Path) -> FsResult<()>
fn remove_file(&self, path: &Path) -> FsResult<()>
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