/// Forces a sync on a Btrfs filesystem containing the `Path`.
Forces a sync on a Btrfs filesystem containing the `Path`.
Forces a sync on a Btrfs filesystem containing the ` Path ` .
pub fn sync<P: AsRef<Path>>(path: P) -> Result<(), Error> {
    let cpath = CString::new(path.as_ref().as_os_str().as_bytes()).unwrap();
    let errcode = unsafe { ffi::btrfs_util_sync(cpath.as_ptr()) };
    if errcode == ffi::btrfs_util_error_BTRFS_UTIL_OK {
        Ok(())
    } else {
        Err(errcode.into())
    }
}
pub fn sync < P : AsRef < Path > > ( path : P ) -> Result < ( ) , Error > { let cpath = CString :: new ( path . as_ref ( ) . as_os_str ( ) . as_bytes ( ) ) . unwrap ( ) ; let errcode = unsafe { ffi :: btrfs_util_sync ( cpath . as_ptr ( ) ) } ; if errcode == ffi :: btrfs_util_error_BTRFS_UTIL_OK { Ok ( ( ) ) } else { Err ( errcode . into ( ) ) } }
Forces a sync on a Btrfs filesystem containing the `Path`.
Forces a sync on a Btrfs filesystem containing the ` Path ` .
path
P