9 releases
| 0.3.0 | Mar 21, 2022 |
|---|---|
| 0.2.4 | Apr 9, 2020 |
| 0.2.3 | Nov 8, 2019 |
| 0.2.2 | Feb 20, 2019 |
| 0.1.0 | Nov 2, 2018 |
#181 in Unix APIs
23,425 downloads per month
Used in 31 crates
(17 directly)
24KB
531 lines
proc-mounts
Rust crate that provides easy access to data from the /proc/swaps and /proc/mounts files.
extern crate proc_mounts;
use proc_mounts::{MountIter, SwapIter};
use std::io;
fn main() -> io::Result<()> {
println!("# Active Mounts");
for mount in MountIter::new()? {
println!("{:#?}", mount);
}
println!("# Active Swaps");
for swap in SwapIter::new()? {
println!("{:#?}", swap);
}
Ok(())
}
Dependencies
~200–620KB
~14K SLoC