pub struct RealFs;Expand description
Production filesystem implementation — delegates to std::fs.
Implementations§
Trait Implementations§
Source§impl VortexFs for RealFs
impl VortexFs for RealFs
Source§fn read_file(&self, path: &str) -> VortexFsResult<Vec<u8>>
fn read_file(&self, path: &str) -> VortexFsResult<Vec<u8>>
Read the entire contents of a file.
Source§fn write_file(&mut self, path: &str, data: &[u8]) -> VortexFsResult<()>
fn write_file(&mut self, path: &str, data: &[u8]) -> VortexFsResult<()>
Write data to a file (creates or overwrites).
Source§fn append_file(&mut self, path: &str, data: &[u8]) -> VortexFsResult<()>
fn append_file(&mut self, path: &str, data: &[u8]) -> VortexFsResult<()>
Append data to a file (creates if not exists).
Source§fn remove_file(&mut self, path: &str) -> VortexFsResult<()>
fn remove_file(&mut self, path: &str) -> VortexFsResult<()>
Remove a file.
Source§fn create_dir_all(&mut self, path: &str) -> VortexFsResult<()>
fn create_dir_all(&mut self, path: &str) -> VortexFsResult<()>
Create a directory (and all parent directories).
Source§fn remove_dir(&mut self, path: &str) -> VortexFsResult<()>
fn remove_dir(&mut self, path: &str) -> VortexFsResult<()>
Remove an empty directory.
Source§fn read_dir(&self, path: &str) -> VortexFsResult<Vec<String>>
fn read_dir(&self, path: &str) -> VortexFsResult<Vec<String>>
List the entries in a directory.
Source§fn metadata(&self, path: &str) -> VortexFsResult<FileMetadata>
fn metadata(&self, path: &str) -> VortexFsResult<FileMetadata>
Get metadata about a file or directory.
Auto Trait Implementations§
impl Freeze for RealFs
impl RefUnwindSafe for RealFs
impl Send for RealFs
impl Sync for RealFs
impl Unpin for RealFs
impl UnsafeUnpin for RealFs
impl UnwindSafe for RealFs
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