pub struct OverlayDirectoryObject {
overlay_fs: Arc<OverlayFS>,
path: String,
position: RwLock<u64>,
}
Expand description
File object for OverlayFS directory operations
OverlayDirectoryObject handles reading directory entries from overlayfs, merging entries from upper and lower layers while respecting whiteout files.
Fields§
§overlay_fs: Arc<OverlayFS>
§path: String
§position: RwLock<u64>
Implementations§
Source§impl OverlayDirectoryObject
impl OverlayDirectoryObject
pub fn new(overlay_fs: Arc<OverlayFS>, path: String) -> Self
Sourcefn collect_directory_entries(
&self,
) -> Result<Vec<DirectoryEntryInternal>, FileSystemError>
fn collect_directory_entries( &self, ) -> Result<Vec<DirectoryEntryInternal>, FileSystemError>
Collect all directory entries from all layers, handling whiteouts and merging
Sourcefn try_fs_from_mount(
mount: &Arc<MountPoint>,
) -> Result<Arc<dyn FileSystemOperations>, FileSystemError>
fn try_fs_from_mount( mount: &Arc<MountPoint>, ) -> Result<Arc<dyn FileSystemOperations>, FileSystemError>
Safe version of fs_from_mount that returns Result instead of panicking
Trait Implementations§
Source§impl FileObject for OverlayDirectoryObject
impl FileObject for OverlayDirectoryObject
Source§fn seek(&self, _whence: SeekFrom) -> Result<u64, StreamError>
fn seek(&self, _whence: SeekFrom) -> Result<u64, StreamError>
Seek to a position in the file stream
Source§fn metadata(&self) -> Result<FileMetadata, StreamError>
fn metadata(&self) -> Result<FileMetadata, StreamError>
Get metadata about the file
Source§fn truncate(&self, _size: u64) -> Result<(), StreamError>
fn truncate(&self, _size: u64) -> Result<(), StreamError>
Truncate the file to the specified size Read more
Source§impl StreamOps for OverlayDirectoryObject
impl StreamOps for OverlayDirectoryObject
Source§fn read(&self, buffer: &mut [u8]) -> Result<usize, StreamError>
fn read(&self, buffer: &mut [u8]) -> Result<usize, StreamError>
Read data from the stream
Source§fn write(&self, _buffer: &[u8]) -> Result<usize, StreamError>
fn write(&self, _buffer: &[u8]) -> Result<usize, StreamError>
Write data to the stream