#linux #fs

lfs-core

give information on mounted disks

26 releases

new 0.12.0 Dec 21, 2024
0.11.2 Oct 14, 2023
0.11.1 Dec 10, 2022
0.11.0 Mar 4, 2022
0.3.1 Oct 18, 2020

#1695 in Filesystem

Download history 384/week @ 2024-08-31 768/week @ 2024-09-07 455/week @ 2024-09-14 592/week @ 2024-09-21 299/week @ 2024-09-28 402/week @ 2024-10-05 544/week @ 2024-10-12 604/week @ 2024-10-19 512/week @ 2024-10-26 526/week @ 2024-11-02 633/week @ 2024-11-09 491/week @ 2024-11-16 336/week @ 2024-11-23 461/week @ 2024-11-30 420/week @ 2024-12-07 281/week @ 2024-12-14

1,577 downloads per month
Used in 8 crates (5 directly)

MIT license

25KB
593 lines

MIT Latest Version docs Chat on Miaou

Give information on the mounted disks.

lfs-core provides the data of lfs and of the :fs screen of broot.


lib.rs:

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

// get all mount points
let options = lfs_core::ReadOptions::default();
let mut mounts = lfs_core::read_mounts(&options).unwrap();
// only keep the one with size stats
mounts.retain(|m| m.stats.is_ok());
// 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.

Dependencies

~2.6–4MB
~74K SLoC