Struct fuse_backend_rs::transport::FuseSession
source · pub struct FuseSession { /* private fields */ }
Expand description
A fuse session manager to manage the connection with the in kernel fuse driver.
Implementations§
source§impl FuseSession
impl FuseSession
sourcepub fn new(
mountpoint: &Path,
fsname: &str,
subtype: &str,
readonly: bool,
) -> Result<FuseSession>
pub fn new( mountpoint: &Path, fsname: &str, subtype: &str, readonly: bool, ) -> Result<FuseSession>
Create a new fuse session, without mounting/connecting to the in kernel fuse driver.
sourcepub fn new_with_autounmount(
mountpoint: &Path,
fsname: &str,
subtype: &str,
readonly: bool,
auto_unmount: bool,
) -> Result<FuseSession>
pub fn new_with_autounmount( mountpoint: &Path, fsname: &str, subtype: &str, readonly: bool, auto_unmount: bool, ) -> Result<FuseSession>
Create a new fuse session, without mounting/connecting to the in kernel fuse driver.
sourcepub fn set_target_mntns(&mut self, pid: Option<pid_t>)
pub fn set_target_mntns(&mut self, pid: Option<pid_t>)
Set the target pid of mount namespace of the fuse session mount, the fuse will be mounted under the given mnt ns.
sourcepub fn set_fusermount(&mut self, bin: &str)
pub fn set_fusermount(&mut self, bin: &str)
Set fusermount binary, default to fusermount3.
sourcepub fn set_allow_other(&mut self, allow_other: bool)
pub fn set_allow_other(&mut self, allow_other: bool)
Set the allow_other mount option. This allows other users than the one mounting the filesystem to access the filesystem. However, this option is usually restricted to the root user unless configured otherwise.
sourcepub fn get_fusermount(&self) -> &str
pub fn get_fusermount(&self) -> &str
Get current fusermount binary.
sourcepub fn get_fuse_file(&self) -> Option<&File>
pub fn get_fuse_file(&self) -> Option<&File>
Expose the associated FUSE session file.
sourcepub fn set_fuse_file(&mut self, file: File)
pub fn set_fuse_file(&mut self, file: File)
Force setting the associated FUSE session file.
sourcepub fn clone_fuse_file(&self) -> Result<File>
pub fn clone_fuse_file(&self) -> Result<File>
Clone fuse file using ioctl FUSE_DEV_IOC_CLONE.
sourcepub fn mountpoint(&self) -> &Path
pub fn mountpoint(&self) -> &Path
Get the mountpoint of the session.
sourcepub fn mount(&mut self) -> Result<()>
pub fn mount(&mut self) -> Result<()>
Mount the fuse mountpoint, building connection with the in kernel fuse driver.
sourcepub fn new_channel(&self) -> Result<FuseChannel>
pub fn new_channel(&self) -> Result<FuseChannel>
Create a new fuse message channel.