Expand description
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:
- This pathdirectory does not exist.
- Invalid path.
- The current process does not have the permission rights to access path.
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