diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2020-11-06 09:52:36 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2020-11-06 09:52:36 +0100 |
commit | 4f56e2df5afdd6aee60b30d69e22eaa4ef330e5b (patch) | |
tree | 86b392a5019a3f4cbd78ee2885b668a0e2964e33 /src/filestore/staging.rs | |
parent | 5ae1c3c64e569e5a57f46c404437fab960a125c1 (diff) |
Add helper functions in filestore implementations
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'src/filestore/staging.rs')
-rw-r--r-- | src/filestore/staging.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/filestore/staging.rs b/src/filestore/staging.rs index c3215c8..9831c3f 100644 --- a/src/filestore/staging.rs +++ b/src/filestore/staging.rs @@ -8,6 +8,7 @@ use resiter::Map; use tar; use crate::filestore::util::FileStoreImpl; +use crate::filestore::Artifact; // The implementation of this type must be available in the merged filestore. pub struct StagingStore(pub (in crate::filestore) FileStoreImpl); @@ -53,5 +54,17 @@ impl StagingStore { }) .collect() } + + pub fn load_from_path(&mut self, pb: &PathBuf) -> Result<&Artifact> { + self.0.load_from_path(pb) + } + + pub fn root_path(&self) -> &Path { + self.0.root_path() + } + + pub fn path_exists_in_store_root(&self, path: &Path) -> bool { + self.0.path_exists_in_store_root(path) + } } |