Struct fuse::Session
[−]
[src]
pub struct Session<FS: Filesystem> { pub filesystem: FS, pub proto_major: u32, pub proto_minor: u32, pub initialized: bool, pub destroyed: bool, // some fields omitted }
The session data structure
Fields
filesystem: FS
Filesystem operation implementations
proto_major: u32
FUSE protocol major version
proto_minor: u32
FUSE protocol minor version
initialized: bool
True if the filesystem is initialized (init operation done)
destroyed: bool
True if the filesystem was destroyed (destroy operation done)
Methods
impl<FS: Filesystem> Session<FS>
[src]
fn new(
filesystem: FS,
mountpoint: &Path,
options: &[&OsStr]
) -> Result<Session<FS>>
filesystem: FS,
mountpoint: &Path,
options: &[&OsStr]
) -> Result<Session<FS>>
Create a new session by mounting the given filesystem to the given mountpoint
fn mountpoint(&self) -> &Path
Return path of the mounted filesystem
fn run(&mut self) -> Result<()>
Run the session loop that receives kernel requests and dispatches them to method calls into the filesystem. This read-dispatch-loop is non-concurrent to prevent having multiple buffers (which take up much memory), but the filesystem methods may run concurrent by spawning threads.
impl<'a, FS: Filesystem + Send + 'a> Session<FS>
[src]
unsafe fn spawn(self) -> Result<BackgroundSession<'a>>
Run the session loop in a background thread