Function sys_mount::unmount[][src]

pub fn unmount<P: AsRef<Path>>(path: P, flags: UnmountFlags) -> Result<()>

Unmounts the device at path using the provided UnmountFlags.

This will not detach a loopback device if the mount was attached to one. This behavior may change in the future, once the loopdev crate supports querying loopback device info.

extern crate sys_mount;
 
use sys_mount::{unmount, UnmountFlags};
 
fn main() {
    // Unmount device at `/target/path` lazily.
    let result = unmount("/target/path", UnmountFlags::DETACH);
}