Function fs_extra::dir::get_size[][src]

pub fn get_size<P>(path: P) -> Result<u64> where
    P: AsRef<Path>, 

Returns the size of the file or directory

Errors

This function will return an error in the following situations, but is not limited to just these cases:

Examples

extern crate fs_extra;
use fs_extra::dir::get_size;

let folder_size = get_size("dir")?;
println!("{}", folder_size); // print directory sile in bytes