nc 0.9.8

Access system calls directly
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
/// Get file system statistics
pub unsafe fn statvfs1<P: AsRef<Path>>(
    path: P,
    buf: &mut statvfs_t,
    flags: i32,
) -> Result<(), Errno> {
    let path = CString::new(path.as_ref());
    let path_ptr = path.as_ptr() as usize;
    let buf_ptr = core::ptr::from_mut(buf) as usize;
    let flags = flags as usize;
    unsafe { syscall3(SYS_STATVFS1, path_ptr, buf_ptr, flags).map(drop) }
}