pub fn of(path: impl AsRef<Path>) -> Result<Disk>Expand description
The mount holding path. Only that filesystem is asked for its space, so a
dead network mount elsewhere does not matter; path on one blocks.
let d = sys_lib::disk::of(".")?;
println!("{} on {} ({:?})", d.filesystem, d.mount_point.display(), d.kind);ยงErrors
NotFound when path does not exist or the mount table is hidden;
PermissionDenied when it cannot be reached.