Struct grebedb::vfs::OsVfs [−][src]
Interface to a real file system on disk.
Implementations
impl OsVfs
[src]
pub fn new<P>(root: P) -> Self where
P: Into<PathBuf>,
[src]
P: Into<PathBuf>,
Create a file system interface to the given path.
The given path is treated as the root for subsequent relative path operations.
Trait Implementations
impl Debug for OsVfs
[src]
impl Vfs for OsVfs
[src]
fn lock(&mut self, path: &str) -> Result<(), Error>
[src]
fn unlock(&mut self, path: &str) -> Result<(), Error>
[src]
fn read(&self, path: &str) -> Result<Vec<u8>, Error>
[src]
fn write(
&mut self,
path: &str,
data: &[u8],
sync_option: VfsSyncOption
) -> Result<(), Error>
[src]
&mut self,
path: &str,
data: &[u8],
sync_option: VfsSyncOption
) -> Result<(), Error>
fn remove_file(&mut self, path: &str) -> Result<(), Error>
[src]
fn read_dir(&self, path: &str) -> Result<Vec<String>, Error>
[src]
fn create_dir(&mut self, path: &str) -> Result<(), Error>
[src]
fn remove_dir(&mut self, path: &str) -> Result<(), Error>
[src]
fn rename_file(&mut self, old_path: &str, new_path: &str) -> Result<(), Error>
[src]
fn is_dir(&self, path: &str) -> Result<bool, Error>
[src]
fn exists(&self, path: &str) -> Result<bool, Error>
[src]
fn create_dir_all(&mut self, path: &str) -> Result<(), Error>
[src]
fn remove_empty_dir_all(&mut self, path: &str) -> Result<(), Error>
[src]
Auto Trait Implementations
impl RefUnwindSafe for OsVfs
impl Send for OsVfs
impl Sync for OsVfs
impl Unpin for OsVfs
impl UnwindSafe for OsVfs
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,