summaryrefslogtreecommitdiffstats
path: root/src/filestore/staging.rs
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2020-10-28 13:49:46 +0100
committerMatthias Beyer <mail@beyermatthias.de>2020-10-28 13:49:52 +0100
commit9cbe616c7ce4404e642709648bd7c97a4e849040 (patch)
tree17f2ab59b4935a72e468427b6ef860532658c133 /src/filestore/staging.rs
parent6b6a6640ffd579ccf1b7f5b90dd788fb3317ff2d (diff)
Implement file store abstraction
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'src/filestore/staging.rs')
-rw-r--r--src/filestore/staging.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/filestore/staging.rs b/src/filestore/staging.rs
new file mode 100644
index 0000000..6ef8cea
--- /dev/null
+++ b/src/filestore/staging.rs
@@ -0,0 +1,15 @@
+use std::path::Path;
+use std::path::PathBuf;
+use anyhow::Result;
+
+use crate::filestore::util::FileStoreImpl;
+
+// The implementation of this type must be available in the merged filestore.
+pub struct StagingStore(pub (in crate::filestore) FileStoreImpl);
+
+impl StagingStore {
+ pub fn load(root: &Path) -> Result<Self> {
+ FileStoreImpl::load(root).map(StagingStore)
+ }
+}
+