summaryrefslogtreecommitdiffstats
path: root/src/common.rs
diff options
context:
space:
mode:
authorSebastian Thiel <sthiel@thoughtworks.com>2019-06-01 14:46:42 +0530
committerSebastian Thiel <sthiel@thoughtworks.com>2019-06-01 14:46:42 +0530
commit498bcd0da4dc44d04634f2cabc245f4c46d2c46a (patch)
tree7b8291b2f81e693b4f173e1b588582c971fce09a /src/common.rs
parentf8c3ba29134af08ea7b70b4fe3951307c6be6e3a (diff)
Add simple statistics, just for fun!
Diffstat (limited to 'src/common.rs')
-rw-r--r--src/common.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/common.rs b/src/common.rs
index e17a712..658a404 100644
--- a/src/common.rs
+++ b/src/common.rs
@@ -57,7 +57,15 @@ impl WalkOptions {
}
}
+#[derive(Default, Debug)]
+pub struct Statistics {
+ pub files_traversed: u64,
+ pub smallest_file_in_bytes: u64,
+ pub largest_file_in_bytes: u64,
+}
+
#[derive(Default)]
pub struct WalkResult {
pub num_errors: u64,
+ pub stats: Statistics,
}