NodeOps

Trait NodeOps 

Source
pub trait NodeOps:
    Send
    + Sync
    + 'static {
    // Required methods
    fn inode(&self) -> u64;
    fn metadata(&self) -> VfsResult<Metadata>;
    fn update_metadata(&self, update: MetadataUpdate) -> VfsResult<()>;
    fn filesystem(&self) -> &dyn FilesystemOps;
    fn sync(&self, data_only: bool) -> VfsResult<()>;
    fn into_any(self: Arc<Self>) -> Arc<dyn Any + Send + Sync>;

    // Provided methods
    fn len(&self) -> VfsResult<u64> { ... }
    fn flags(&self) -> NodeFlags { ... }
}
Expand description

Filesystem node operationss

Required Methods§

Source

fn inode(&self) -> u64

Gets the inode number of the node.

Source

fn metadata(&self) -> VfsResult<Metadata>

Gets the metadata of the node.

Source

fn update_metadata(&self, update: MetadataUpdate) -> VfsResult<()>

Updates the metadata of the node.

Source

fn filesystem(&self) -> &dyn FilesystemOps

Gets the filesystem

Source

fn sync(&self, data_only: bool) -> VfsResult<()>

Synchronizes the file to disk.

Source

fn into_any(self: Arc<Self>) -> Arc<dyn Any + Send + Sync>

Casts the node to a &dyn core::any::Any.

Provided Methods§

Source

fn len(&self) -> VfsResult<u64>

Gets the size of the node.

Source

fn flags(&self) -> NodeFlags

Returns the flags of the node.

Implementors§