Crate lfs_core[][src]

Expand description

Use lfs_core::read_mounts to get information on all mounted volumes on a unix system.

// get all mount points
let mut mounts = lfs_core::read_mounts().unwrap();
// only keep the one with size stats
mounts.retain(|m| m.stats.is_some());
// print them
for mount in mounts {
    dbg!(mount);
}

The lfs application is a viewer for lfs-core and shows you the information you’re expected to find in mounts.

Structs

DeviceId

Id of a device, as can be found in MetadataExt.dev().

Disk

a “block device”

Mount

A mount point

MountInfo

A mount point as described in /proc/self/mountinfo

Stats

inode & blocs information given by statvfs

Enums

Error

lfs error type

Functions

read_disks
read_mountinfo

read all the mount points

read_mounts

read all the mount points and load basic information on them

Type Definitions

MountId

An id of a mount

Result