summaryrefslogtreecommitdiffstats
path: root/src/filestore/path.rs
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2020-12-07 13:31:38 +0100
committerMatthias Beyer <mail@beyermatthias.de>2020-12-07 13:31:38 +0100
commit6915232f680e395a1b0329a96dba967d9105590d (patch)
tree26bba202cd9a797488dd684d40cf1e33225b343a /src/filestore/path.rs
parent83cd6aedb2e5e76ff9ee8ce009dda122f4379fbd (diff)
Remove StoreRoot::as_path()
This patch reduces the mis-useable parts of the StoreRoot interface further by removing the StoreRoot::as_path() function. A function to get a walkdir::WalkDir was added instead. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'src/filestore/path.rs')
-rw-r--r--src/filestore/path.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/filestore/path.rs b/src/filestore/path.rs
index 134c132..80cd043 100644
--- a/src/filestore/path.rs
+++ b/src/filestore/path.rs
@@ -41,13 +41,13 @@ impl StoreRoot {
self.0.join(subpath).is_dir()
}
- pub (in crate::filestore) fn as_path(&self) -> &Path {
- self.0.as_ref()
- }
-
pub fn display(&self) -> std::path::Display {
self.0.display()
}
+
+ pub (in crate::filestore) fn walk(&self) -> walkdir::WalkDir {
+ walkdir::WalkDir::new(&self.0)
+ }
}
impl AsRef<Path> for StoreRoot {