/// Deletes a subvolume or snapshot.
Deletes a subvolume or snapshot.
Deletes a subvolume or snapshot .
pub fn delete_subvolume<P: AsRef<Path>>(path: P, flags: DeleteSubvolumeFlags) -> Result<(), Error> {
    let cpath = CString::new(path.as_ref().as_os_str().as_bytes()).unwrap();
    let cflags = flags.bits();
    unsafe {
        let errcode = ffi::btrfs_util_delete_subvolume(cpath.as_ptr(), cflags);
        if errcode != ffi::btrfs_util_error_BTRFS_UTIL_OK {
            return Err(errcode.into());
        }
    }
    Ok(())
}
pub fn delete_subvolume < P : AsRef < Path > > ( path : P , flags : DeleteSubvolumeFlags ) -> Result < ( ) , Error > { let cpath = CString :: new ( path . as_ref ( ) . as_os_str ( ) . as_bytes ( ) ) . unwrap ( ) ; let cflags = flags . bits ( ) ; unsafe { let errcode = ffi :: btrfs_util_delete_subvolume ( cpath . as_ptr ( ) , cflags ) ; if errcode != ffi :: btrfs_util_error_BTRFS_UTIL_OK { return Err ( errcode . into ( ) ) ; } } Ok ( ( ) ) }
Deletes a subvolume or snapshot.
Deletes a subvolume or snapshot .
path
P
flags
DeleteSubvolumeFlags