lfs_core/lib.rs
1/*!
2
3Use `lfs_core::read_mounts` to get information on all mounted volumes on a unix system.
4
5```
6// get all mount points
7let options = lfs_core::ReadOptions::default();
8let mut mounts = lfs_core::read_mounts(&options).unwrap();
9// only keep the one with size stats
10mounts.retain(|m| m.stats.is_ok());
11// print them
12for mount in mounts {
13 dbg!(mount);
14}
15```
16
17The [dysk](https://github.com/Canop/dysk) application is a viewer for lfs-core and shows you the information you're expected to find in mounts.
18
19*/
20
21mod device_id;
22mod disk;
23mod error;
24mod inodes;
25mod label;
26#[cfg(target_os = "linux")]
27mod linux;
28#[cfg(target_os = "macos")]
29mod macos;
30mod mount;
31mod mountinfo;
32mod read_options;
33mod stats;
34mod sys;
35
36pub use {
37 device_id::*,
38 disk::*,
39 error::*,
40 inodes::*,
41 label::*,
42 mount::*,
43 mountinfo::*,
44 read_options::*,
45 stats::*,
46};
47
48#[cfg(target_os = "linux")]
49pub use linux::read_mounts;
50#[cfg(target_os = "macos")]
51pub use macos::read_mounts;