[][src]Function heim::disk::usage

pub fn usage<T>(path: T) -> impl Future<Output = Result<Usage, Error>> where
    T: AsRef<Path>, 

Returns disk Usage statistics about the partition which contains the given path.

Examples

#[cfg(unix)]
static USAGE_PATH: &'static str = "/";
#[cfg(windows)]
static USAGE_PATH: &'static str = "C:\\";

let usage = usage(USAGE_PATH).await?;
dbg!(usage);