pub struct FsStats { /* private fields */ }
Expand description
FsStats
contains some common stats about a file system.
Implementations§
Source§impl FsStats
impl FsStats
Sourcepub fn free_space(&self) -> u64
pub fn free_space(&self) -> u64
Returns the number of free bytes in the file system containing the provided path.
Sourcepub fn available_space(&self) -> u64
pub fn available_space(&self) -> u64
Returns the available space in bytes to non-priveleged users in the file system containing the provided path.
Sourcepub fn total_space(&self) -> u64
pub fn total_space(&self) -> u64
Returns the total space in bytes in the file system containing the provided path.
Sourcepub fn allocation_granularity(&self) -> u64
pub fn allocation_granularity(&self) -> u64
Returns the filesystem’s disk space allocation granularity in bytes. The provided path may be for any file in the filesystem.
On Posix, this is equivalent to the filesystem’s block size. On Windows, this is equivalent to the filesystem’s cluster size.
Trait Implementations§
impl Eq for FsStats
impl StructuralPartialEq for FsStats
Auto Trait Implementations§
impl Freeze for FsStats
impl RefUnwindSafe for FsStats
impl Send for FsStats
impl Sync for FsStats
impl Unpin for FsStats
impl UnwindSafe for FsStats
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)