Struct linux_info::storage::FsStat
source · [−]pub struct FsStat { /* private fields */ }Expand description
Filesystem statistics
Implementations
sourceimpl FsStat
impl FsStat
sourcepub fn read(path: impl AsRef<Path>) -> Result<Self>
pub fn read(path: impl AsRef<Path>) -> Result<Self>
Reads filesystems staticstics for a given file descriptor.
sourcepub fn has_blocks(&self) -> bool
pub fn has_blocks(&self) -> bool
Returns true if the total blocks is bigger than zero.
sourcepub fn block_size(&self) -> Option<usize>
pub fn block_size(&self) -> Option<usize>
The block size in bytes used for this filesystem.
sourcepub fn total_blocks(&self) -> Option<usize>
pub fn total_blocks(&self) -> Option<usize>
The total block count.
sourcepub fn free_blocks(&self) -> Option<usize>
pub fn free_blocks(&self) -> Option<usize>
The blocks that are still free may not all be accessible to unprivileged users.
sourcepub fn available_blocks(&self) -> Option<usize>
pub fn available_blocks(&self) -> Option<usize>
The blocks that are free and accessible to unprivileged users.
sourcepub fn used_blocks(&self) -> Option<usize>
pub fn used_blocks(&self) -> Option<usize>
The blocks that are already used.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for FsStat
impl Send for FsStat
impl Sync for FsStat
impl Unpin for FsStat
impl UnwindSafe for FsStat
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more