[−][src]Crate proc_mounts
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(()) }
Structs
MOUNTS | Static list of mounts that is dynamically updated in the background. |
MountInfo | A mount entry which contains information regarding how and where a source is mounted. |
MountIter | Iteratively parse the |
MountList | A list of parsed mount entries from |
SWAPS | Static list of swap points that is dynamically updated in the background. |
SwapInfo | A swap entry, which defines an active swap. |
SwapIter | Iteratively parse the |
SwapList | A list of parsed swap entries from |