pub struct ReadOnlyVfs { /* private fields */ }
Expand description
Wrapper that allows only read operations.
Implementations§
Trait Implementations§
Source§impl Debug for ReadOnlyVfs
impl Debug for ReadOnlyVfs
Source§impl Vfs for ReadOnlyVfs
impl Vfs for ReadOnlyVfs
Source§fn lock(&mut self, path: &str) -> Result<(), Error>
fn lock(&mut self, path: &str) -> Result<(), Error>
Lock the file preventing other processes from accessing it. Read more
Source§fn write(
&mut self,
_path: &str,
_data: &[u8],
_sync_option: VfsSyncOption,
) -> Result<(), Error>
fn write( &mut self, _path: &str, _data: &[u8], _sync_option: VfsSyncOption, ) -> Result<(), Error>
Write the contents to a file. Read more
Source§fn sync_file(
&mut self,
_path: &str,
_sync_option: VfsSyncOption,
) -> Result<(), Error>
fn sync_file( &mut self, _path: &str, _sync_option: VfsSyncOption, ) -> Result<(), Error>
Flush buffered data of a file to persistent storage. Read more
Source§fn read_dir(&self, path: &str) -> Result<Vec<String>, Error>
fn read_dir(&self, path: &str) -> Result<Vec<String>, Error>
Return a vector of filenames in a directory.
Source§fn create_dir(&mut self, _path: &str) -> Result<(), Error>
fn create_dir(&mut self, _path: &str) -> Result<(), Error>
Create a directory at the given path. Read more
Source§fn remove_dir(&mut self, _path: &str) -> Result<(), Error>
fn remove_dir(&mut self, _path: &str) -> Result<(), Error>
Remove an empty directory. Read more
Source§fn rename_file(&mut self, _old_path: &str, _new_path: &str) -> Result<(), Error>
fn rename_file(&mut self, _old_path: &str, _new_path: &str) -> Result<(), Error>
Rename a file. Read more
Source§fn is_dir(&self, path: &str) -> Result<bool, Error>
fn is_dir(&self, path: &str) -> Result<bool, Error>
Return whether the path is a directory. Read more
Auto Trait Implementations§
impl Freeze for ReadOnlyVfs
impl !RefUnwindSafe for ReadOnlyVfs
impl Send for ReadOnlyVfs
impl Sync for ReadOnlyVfs
impl Unpin for ReadOnlyVfs
impl !UnwindSafe for ReadOnlyVfs
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