Trait fuse_backend_rs::api::filesystem::Layer

source ·
pub trait Layer: FileSystem {
    // Required method
    fn root_inode(&self) -> Self::Inode;

    // Provided methods
    fn create_whiteout(
        &self,
        ctx: &Context,
        parent: Self::Inode,
        name: &CStr,
    ) -> Result<Entry> { ... }
    fn delete_whiteout(
        &self,
        ctx: &Context,
        parent: Self::Inode,
        name: &CStr,
    ) -> Result<()> { ... }
    fn is_whiteout(&self, ctx: &Context, inode: Self::Inode) -> Result<bool> { ... }
    fn set_opaque(&self, ctx: &Context, inode: Self::Inode) -> Result<()> { ... }
    fn is_opaque(&self, ctx: &Context, inode: Self::Inode) -> Result<bool> { ... }
}
Expand description

A filesystem must implement Layer trait, or it cannot be used as an OverlayFS layer.

Required Methods§

source

fn root_inode(&self) -> Self::Inode

Return the root inode number

Provided Methods§

source

fn create_whiteout( &self, ctx: &Context, parent: Self::Inode, name: &CStr, ) -> Result<Entry>

Create whiteout file with name .

If this call is successful then the lookup count of the Inode associated with the returned Entry must be increased by 1.

source

fn delete_whiteout( &self, ctx: &Context, parent: Self::Inode, name: &CStr, ) -> Result<()>

Delete whiteout file with name .

source

fn is_whiteout(&self, ctx: &Context, inode: Self::Inode) -> Result<bool>

Check if the Inode is a whiteout file

source

fn set_opaque(&self, ctx: &Context, inode: Self::Inode) -> Result<()>

Set the directory to opaque.

source

fn is_opaque(&self, ctx: &Context, inode: Self::Inode) -> Result<bool>

Check if the directory is opaque.

Implementors§