Struct fuse_backend_rs::overlayfs::OverlayFs

source ·
pub struct OverlayFs { /* private fields */ }

Implementations§

source§

impl OverlayFs

source

pub fn new( upper: Option<Arc<BoxedLayer>>, lowers: Vec<Arc<BoxedLayer>>, params: Config, ) -> Result<Self>

source

pub fn root_inode(&self) -> Inode

source

pub fn import(&self) -> Result<()>

Trait Implementations§

source§

impl BackendFileSystem for OverlayFs

source§

fn mount(&self) -> Result<(Entry, u64)>

mount returns the backend file system root inode entry and the largest inode number it has.

source§

fn as_any(&self) -> &dyn Any

Provides a reference to the Any trait. This is useful to let the caller have access to the underlying type behind the trait.

source§

impl FileSystem for OverlayFs

source§

type Inode = u64

Represents a location in the filesystem tree and can be used to perform operations that act on the metadata of a file/directory (e.g., getattr and setattr). Can also be used as the starting point for looking up paths in the filesystem tree. An Inode may support operating directly on the content of the path that to which it points. FileSystem implementations that support this should set the FsOptions::ZERO_MESSAGE_OPEN option in the return value of the init function. On linux based systems, an Inode is equivalent to opening a file or directory with the libc::O_PATH flag. Read more
source§

type Handle = u64

Represents a file or directory that is open for reading/writing.
source§

fn init(&self, capable: FsOptions) -> Result<FsOptions>

Initialize the file system. Read more
source§

fn destroy(&self)

Clean up the file system. Read more
source§

fn statfs(&self, ctx: &Context, inode: Inode) -> Result<statvfs64>

Get information about the file system.
source§

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

Look up a directory entry by name and get its attributes. Read more
source§

fn forget(&self, _ctx: &Context, inode: Inode, count: u64)

Forget about an inode. Read more
source§

fn batch_forget(&self, _ctx: &Context, requests: Vec<(Inode, u64)>)

Forget about multiple inodes. Read more
source§

fn opendir( &self, ctx: &Context, inode: Inode, _flags: u32, ) -> Result<(Option<Handle>, OpenOptions)>

Open a directory for reading. Read more
source§

fn releasedir( &self, _ctx: &Context, inode: Inode, _flags: u32, handle: Handle, ) -> Result<()>

Release an open directory. Read more
source§

fn mkdir( &self, ctx: &Context, parent: Inode, name: &CStr, mode: u32, umask: u32, ) -> Result<Entry>

Create a directory. Read more
source§

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

Remove a directory. Read more
source§

fn readdir( &self, ctx: &Context, inode: Inode, handle: Handle, size: u32, offset: u64, add_entry: &mut dyn FnMut(DirEntry<'_>) -> Result<usize>, ) -> Result<()>

Read a directory. Read more
source§

fn readdirplus( &self, ctx: &Context, inode: Inode, handle: Handle, size: u32, offset: u64, add_entry: &mut dyn FnMut(DirEntry<'_>, Entry) -> Result<usize>, ) -> Result<()>

Read a directory with entry attributes. Read more
source§

fn open( &self, ctx: &Context, inode: Inode, flags: u32, fuse_flags: u32, ) -> Result<(Option<Handle>, OpenOptions, Option<u32>)>

Open a file. Read more
source§

fn release( &self, ctx: &Context, _inode: Inode, flags: u32, handle: Handle, flush: bool, flock_release: bool, lock_owner: Option<u64>, ) -> Result<()>

Release an open file. Read more
source§

fn create( &self, ctx: &Context, parent: Inode, name: &CStr, args: CreateIn, ) -> Result<(Entry, Option<Handle>, OpenOptions, Option<u32>)>

Create and open a file. Read more
Remove a file. Read more
source§

fn read( &self, ctx: &Context, inode: Inode, handle: Handle, w: &mut dyn ZeroCopyWriter, size: u32, offset: u64, lock_owner: Option<u64>, flags: u32, ) -> Result<usize>

Read data from a file. Read more
source§

fn write( &self, ctx: &Context, inode: Inode, handle: Handle, r: &mut dyn ZeroCopyReader, size: u32, offset: u64, lock_owner: Option<u64>, delayed_write: bool, flags: u32, fuse_flags: u32, ) -> Result<usize>

Write data to a file. Read more
source§

fn getattr( &self, ctx: &Context, inode: Inode, handle: Option<Handle>, ) -> Result<(stat64, Duration)>

Get attributes for a file / directory. Read more
source§

fn setattr( &self, ctx: &Context, inode: Inode, attr: stat64, handle: Option<Handle>, valid: SetattrValid, ) -> Result<(stat64, Duration)>

Set attributes for a file / directory. Read more
source§

fn rename( &self, _ctx: &Context, _olddir: Inode, _odlname: &CStr, _newdir: Inode, _newname: &CStr, _flags: u32, ) -> Result<()>

Rename a file / directory. Read more
source§

fn mknod( &self, ctx: &Context, parent: Inode, name: &CStr, mode: u32, rdev: u32, umask: u32, ) -> Result<Entry>

Create a file node. Read more
Create a hard link. Read more
Create a symbolic link. Read more
Read a symbolic link.
source§

fn flush( &self, ctx: &Context, inode: Inode, handle: Handle, lock_owner: u64, ) -> Result<()>

Flush the contents of a file. Read more
source§

fn fsync( &self, ctx: &Context, inode: Inode, datasync: bool, handle: Handle, ) -> Result<()>

Synchronize file contents. Read more
source§

fn fsyncdir( &self, ctx: &Context, inode: Inode, datasync: bool, handle: Handle, ) -> Result<()>

Synchronize the contents of a directory. Read more
source§

fn access(&self, ctx: &Context, inode: Inode, mask: u32) -> Result<()>

Check file access permissions. Read more
source§

fn setxattr( &self, ctx: &Context, inode: Inode, name: &CStr, value: &[u8], flags: u32, ) -> Result<()>

Set an extended attribute. Read more
source§

fn getxattr( &self, ctx: &Context, inode: Inode, name: &CStr, size: u32, ) -> Result<GetxattrReply>

Get an extended attribute. Read more
source§

fn listxattr( &self, ctx: &Context, inode: Inode, size: u32, ) -> Result<ListxattrReply>

List extended attribute names. Read more
source§

fn removexattr(&self, ctx: &Context, inode: Inode, name: &CStr) -> Result<()>

Remove an extended attribute. Read more
source§

fn fallocate( &self, ctx: &Context, inode: Inode, handle: Handle, mode: u32, offset: u64, length: u64, ) -> Result<()>

Allocate requested space for file data. Read more
source§

fn lseek( &self, ctx: &Context, inode: Inode, handle: Handle, offset: u64, whence: u32, ) -> Result<u64>

Reposition read/write file offset.
source§

fn getlk( &self, ctx: &Context, inode: Self::Inode, handle: Self::Handle, owner: u64, lock: FileLock, flags: u32, ) -> Result<FileLock>

Query file lock status
source§

fn setlk( &self, ctx: &Context, inode: Self::Inode, handle: Self::Handle, owner: u64, lock: FileLock, flags: u32, ) -> Result<()>

Grab a file read lock
source§

fn setlkw( &self, ctx: &Context, inode: Self::Inode, handle: Self::Handle, owner: u64, lock: FileLock, flags: u32, ) -> Result<()>

Grab a file write lock
source§

fn ioctl( &self, ctx: &Context, inode: Self::Inode, handle: Self::Handle, flags: u32, cmd: u32, data: IoctlData<'_>, out_size: u32, ) -> Result<IoctlData<'_>>

send ioctl to the file
source§

fn bmap( &self, ctx: &Context, inode: Self::Inode, block: u64, blocksize: u32, ) -> Result<u64>

Query a file’s block mapping info
source§

fn poll( &self, ctx: &Context, inode: Self::Inode, handle: Self::Handle, khandle: Self::Handle, flags: u32, events: u32, ) -> Result<u32>

Poll a file’s events
source§

fn notify_reply(&self) -> Result<()>

TODO: support this
source§

fn id_remap(&self, ctx: &mut Context) -> Result<()>

Remap the external IDs in context to internal IDs.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.