summaryrefslogtreecommitdiffstats
path: root/src/filestore/path.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/filestore/path.rs')
-rw-r--r--src/filestore/path.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/filestore/path.rs b/src/filestore/path.rs
index bbcc727..486532f 100644
--- a/src/filestore/path.rs
+++ b/src/filestore/path.rs
@@ -20,6 +20,8 @@ use resiter::AndThen;
use resiter::Filter;
use resiter::Map;
+use crate::filestore::staging::StagingStore;
+
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct StoreRoot(PathBuf);
@@ -139,6 +141,11 @@ impl AsRef<Path> for ArtifactPath {
pub struct FullArtifactPath<'a>(&'a StoreRoot, &'a ArtifactPath);
impl<'a> FullArtifactPath<'a> {
+
+ pub fn is_in_staging_store(&self, store: &StagingStore) -> bool {
+ store.0.root == *self.0
+ }
+
pub fn artifact_path(&self) -> &ArtifactPath {
self.1
}