pub fn list() -> Result<Vec<Disk>>Expand description
The local, real filesystems, sorted by mount point, each once.
Never blocks on a dead network mount (network filesystems are left out), and on Windows never pops up “insert a disk” for an empty drive (threat T8). Inside a container it shows the container’s mounts.
for d in sys_lib::disk::list()? {
println!("{:<20} {:<8} {:?} {:?}", d.mount_point.display(), d.filesystem, d.kind, d.space.map(|s| s.available));
}§Errors
TooLarge with more than 4 096 mounts; NotFound when the mount table is
hidden.