/// Gets the ID of the subvolume containing the `Path`.
Gets the ID of the subvolume containing the `Path`.
Gets the ID of the subvolume containing the ` Path ` .
pub fn subvolume_id<P: AsRef<Path>>(path: P) -> Result<u64, Error> {
    let cpath = CString::new(path.as_ref().as_os_str().as_bytes()).unwrap();
    let mut ret: u64 = 0;
    let errcode = unsafe { ffi::btrfs_util_subvolume_id(cpath.as_ptr(), &mut ret) };
    if errcode == ffi::btrfs_util_error_BTRFS_UTIL_OK {
        Ok(ret)
    } else {
        Err(errcode.into())
    }
}
pub fn subvolume_id < P : AsRef < Path > > ( path : P ) -> Result < u64 , Error > { let cpath = CString :: new ( path . as_ref ( ) . as_os_str ( ) . as_bytes ( ) ) . unwrap ( ) ; let mut ret : u64 = 0 ; let errcode = unsafe { ffi :: btrfs_util_subvolume_id ( cpath . as_ptr ( ) , & mut ret ) } ; if errcode == ffi :: btrfs_util_error_BTRFS_UTIL_OK { Ok ( ret ) } else { Err ( errcode . into ( ) ) } }
Gets the ID of the subvolume containing the `Path`.
Gets the ID of the subvolume containing the ` Path ` .
path
P