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§
sourcefn root_inode(&self) -> Self::Inode
fn root_inode(&self) -> Self::Inode
Return the root inode number
Provided Methods§
sourcefn create_whiteout(
&self,
ctx: &Context,
parent: Self::Inode,
name: &CStr,
) -> Result<Entry>
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.
sourcefn delete_whiteout(
&self,
ctx: &Context,
parent: Self::Inode,
name: &CStr,
) -> Result<()>
fn delete_whiteout( &self, ctx: &Context, parent: Self::Inode, name: &CStr, ) -> Result<()>
Delete whiteout file with name
sourcefn is_whiteout(&self, ctx: &Context, inode: Self::Inode) -> Result<bool>
fn is_whiteout(&self, ctx: &Context, inode: Self::Inode) -> Result<bool>
Check if the Inode is a whiteout file