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 [lfs](https://github.com/Canop/lfs) 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 stats;
33mod sys;
34
35pub use {
36 device_id::*,
37 disk::*,
38 error::*,
39 inodes::*,
40 label::*,
41 mount::*,
42 mountinfo::*,
43 stats::*,
44};
45
46#[cfg(target_os = "linux")]
47pub use linux::read_mounts;
48#[cfg(target_os = "macos")]
49pub use macos::read_mounts;