pub struct OverlayNode {
name: String,
overlay_fs: RwLock<Option<Arc<OverlayFS>>>,
path: String,
file_type: FileType,
file_id: u64,
}
Expand description
A composite node that represents a file/directory across overlay layers
OverlayNode serves as a virtual representation of a file or directory that may exist in one or more layers of the overlay filesystem. It handles the resolution of operations across these layers according to overlay semantics.
§Design
Each OverlayNode represents a specific path in the overlay and delegates operations to the appropriate underlying filesystem layers. The node itself doesn’t store file content but rather coordinates access to the real nodes in the upper and lower layers.
Fields§
§name: String
Node name
overlay_fs: RwLock<Option<Arc<OverlayFS>>>
Reference to overlay filesystem
path: String
Path in the overlay
file_type: FileType
File type (resolved from layers)
file_id: u64
File ID
Implementations§
Source§impl OverlayNode
impl OverlayNode
Trait Implementations§
Source§impl Clone for OverlayNode
impl Clone for OverlayNode
Source§impl VfsNode for OverlayNode
impl VfsNode for OverlayNode
Source§fn filesystem(&self) -> Option<Weak<dyn FileSystemOperations>>
fn filesystem(&self) -> Option<Weak<dyn FileSystemOperations>>
Returns a (Weak) reference to the filesystem this node belongs to
Source§fn metadata(&self) -> Result<FileMetadata, FileSystemError>
fn metadata(&self) -> Result<FileMetadata, FileSystemError>
Get metadata for this node
Source§fn file_type(&self) -> Result<FileType, FileSystemError>
fn file_type(&self) -> Result<FileType, FileSystemError>
Get the file type of this node
Source§fn is_directory(&self) -> Result<bool, FileSystemError>
fn is_directory(&self) -> Result<bool, FileSystemError>
Returns true if this node is a directory
Source§fn is_symlink(&self) -> Result<bool, FileSystemError>
fn is_symlink(&self) -> Result<bool, FileSystemError>
Returns true if this node is a symbolic link
Source§fn read_link(&self) -> Result<String, FileSystemError>
fn read_link(&self) -> Result<String, FileSystemError>
Read the target of a symbolic link (returns error if not a symlink)
Auto Trait Implementations§
impl !Freeze for OverlayNode
impl !RefUnwindSafe for OverlayNode
impl Send for OverlayNode
impl Sync for OverlayNode
impl Unpin for OverlayNode
impl !UnwindSafe for OverlayNode
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)