pub trait DiskExt {
fn get_type(&self) -> DiskType;
fn get_name(&self) -> &OsStr;
fn get_file_system(&self) -> &[u8] ⓘ;
fn get_mount_point(&self) -> &Path;
fn get_total_space(&self) -> u64;
fn get_available_space(&self) -> u64;
fn update(&mut self) -> bool;
}
Expand description
Contains all the methods of the Disk
struct.
Required Methods§
sourcefn get_file_system(&self) -> &[u8] ⓘ
fn get_file_system(&self) -> &[u8] ⓘ
Returns the file system used on this disk (so for example: EXT4
, NTFS
, etc…).
sourcefn get_mount_point(&self) -> &Path
fn get_mount_point(&self) -> &Path
Returns the mount point of the disk (/
for example).
sourcefn get_total_space(&self) -> u64
fn get_total_space(&self) -> u64
Returns the total disk size, in bytes.
sourcefn get_available_space(&self) -> u64
fn get_available_space(&self) -> u64
Returns the available disk size, in bytes.