[go: up one dir, main page]

Function fuser::spawn_mount[][src]

pub fn spawn_mount<'a, FS: Filesystem + Send + 'static + 'a, P: AsRef<Path>>(
    filesystem: FS,
    mountpoint: P,
    options: &[&OsStr]
) -> Result<BackgroundSession>
Expand description

Mount the given filesystem to the given mountpoint. This function spawns a background thread to handle filesystem operations while being mounted and therefore returns immediately. The returned handle should be stored to reference the mounted filesystem. If it’s dropped, the filesystem will be unmounted.

Safety

This interface is inherently unsafe if the BackgroundSession is allowed to leak without being dropped. See rust-lang/rust#24292 for more details.