Function nc::call::statfs

source ·
pub unsafe fn statfs<P: AsRef<Path>>(
    filename: P,
    buf: &mut statfs_t
) -> Result<(), Errno>
Expand description

Get filesystem statistics.

§Example

let path = "/usr";
let mut statfs = nc::statfs_t::default();
let ret = unsafe { nc::statfs(path, &mut statfs) };
assert!(ret.is_ok());
assert!(statfs.f_bfree > 0);
assert!(statfs.f_bavail > 0);