Crates.io | dirinfo |
lib.rs | dirinfo |
version | 0.1.1 |
source | src |
created_at | 2019-01-06 04:14:36.049082 |
updated_at | 2019-01-06 08:48:23.106648 |
description | Crate dirinfo provides easy to use API for collecting various information about a directory hierarchy |
homepage | |
repository | https://github.com/renl/dirinfo |
max_upload_size | |
id | 105782 |
size | 15,611 |
Crate dirinfo
provides easy to use API for collecting various information about a
directory hierarchy.
To use this crate, add dirinfo
as a dependency to your project's Cargo.toml
:
[dependencies]
dirinfo = { git = "https://github.com/renl/dirinfo" }
The following code calculates the total size in bytes of all files found in the directory hierarchy with the root directory specified by the pull function.
use dirinfo::DirInfo;
println!("{}", DirInfo::new().pull(".").get_files_size());