pub struct OverlayFS { /* private fields */ }
Expand description
An overlay file system combining several filesystems into one, an upper layer with read/write access and lower layers with only read access
Files in upper layers shadow those in lower layers. Directories are the merged view of all layers.
NOTE: To allow removing files and directories (e.g. via remove_file()) from the lower layer filesystems, this mechanism creates a .whiteout
folder in the root of the upper level filesystem to mark removed files
Implementations
Trait Implementations
sourceimpl FileSystem for OverlayFS
impl FileSystem for OverlayFS
sourcefn read_dir(&self, path: &str) -> VfsResult<Box<dyn Iterator<Item = String>>>
fn read_dir(&self, path: &str) -> VfsResult<Box<dyn Iterator<Item = String>>>
Iterates over all entries of this directory path
sourcefn open_file(&self, path: &str) -> VfsResult<Box<dyn SeekAndRead>>
fn open_file(&self, path: &str) -> VfsResult<Box<dyn SeekAndRead>>
Opens the file at this path for reading
sourcefn create_file(&self, path: &str) -> VfsResult<Box<dyn Write>>
fn create_file(&self, path: &str) -> VfsResult<Box<dyn Write>>
Creates a file at this path for writing
sourcefn append_file(&self, path: &str) -> VfsResult<Box<dyn Write>>
fn append_file(&self, path: &str) -> VfsResult<Box<dyn Write>>
Opens the file at this path for appending
sourcefn metadata(&self, path: &str) -> VfsResult<VfsMetadata>
fn metadata(&self, path: &str) -> VfsResult<VfsMetadata>
Returns the file metadata for the file at this path
sourcefn exists(&self, path: &str) -> VfsResult<bool>
fn exists(&self, path: &str) -> VfsResult<bool>
Returns true if a file or directory at path exists, false otherwise
sourcefn remove_file(&self, path: &str) -> VfsResult<()>
fn remove_file(&self, path: &str) -> VfsResult<()>
Removes the file at this path
sourcefn remove_dir(&self, path: &str) -> VfsResult<()>
fn remove_dir(&self, path: &str) -> VfsResult<()>
Removes the directory at this path
sourcefn copy_file(&self, _src: &str, _dest: &str) -> VfsResult<()>
fn copy_file(&self, _src: &str, _dest: &str) -> VfsResult<()>
Copies the src path to the destination path within the same filesystem (optional)
Auto Trait Implementations
impl !RefUnwindSafe for OverlayFS
impl Send for OverlayFS
impl Sync for OverlayFS
impl Unpin for OverlayFS
impl !UnwindSafe for OverlayFS
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more