[−][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 |
MountTab | Provides an abstract representation of the contents of a mount tab. |
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 |
Enums
AbstractMountElement | An element in an abtract representation of the mount tab that was read into memory. |