lfs_core/
lib.rs

1/*!
2
3Use `lfs_core::read_mounts` to get information on all mounted volumes.
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#[cfg(windows)]
36mod windows;
37
38pub use {
39    device_id::*,
40    disk::*,
41    error::*,
42    inodes::*,
43    label::*,
44    mount::*,
45    mountinfo::*,
46    read_options::*,
47    stats::*,
48};
49
50#[cfg(target_os = "linux")]
51pub use linux::read_mounts;
52#[cfg(target_os = "macos")]
53pub use macos::read_mounts;
54#[cfg(windows)]
55pub use windows::read_mounts;
56#[cfg(windows)]
57pub use windows::volume_serial_for_path;