aboutsummaryrefslogtreecommitdiff
path: root/lockchain-files/src/load.rs
diff options
context:
space:
mode:
authorKatharina Fey <kookie@spacekookie.de>2018-09-15 20:34:14 +0100
committerKatharina Fey <kookie@spacekookie.de>2018-09-15 20:34:14 +0100
commit87cb39050d938e01b7b26633dab3d141737330ed (patch)
tree0b31f4c8ab0da54f32c959664c46427dc9d9174d /lockchain-files/src/load.rs
parent306c1e56b0dc457b59c47693c62fcab668398020 (diff)
A lot of refactoring in lockchain-files
Diffstat (limited to 'lockchain-files/src/load.rs')
-rw-r--r--lockchain-files/src/load.rs34
1 files changed, 34 insertions, 0 deletions
diff --git a/lockchain-files/src/load.rs b/lockchain-files/src/load.rs
new file mode 100644
index 0000000..fd4e66e
--- /dev/null
+++ b/lockchain-files/src/load.rs
@@ -0,0 +1,34 @@
+//! A small submodule which handles all aspects of vault creation
+#![allow(unused_imports)]
+
+use lcc::errors::VaultError;
+use lcc::{traits::Body, Generator};
+use std::collections::HashMap;
+
+use ::FileVault;
+use ::config::{VaultConfig, ConfigError};
+use ::fs::{Filesystem, FileType};
+
+
+impl<T: Body> FileVault<T> {
+ /// A small utility to load an existing file vault
+ pub(crate) fn load(name: &str, location: &str) -> Result<Self, VaultError> {
+ unimplemented!()
+
+ // self.config = match VaultConfig::load(&self.fs.root) {
+ // Ok(cfg) => cfg,
+ // _ => return Err(VaultError::FailedLoading),
+ // };
+ // Ok(Box::new(self))
+
+ // Self {
+ // meta_info: (name.into(), location.into()),
+ // records: HashMap::new(),
+ // config: VaultConfig::new(Gene),
+ // metadata: HashMap::new(),
+ // fs: Filesystem::new(location, name),
+ // users: UserStoreMapper::new(),
+ // }.load()
+ }
+
+}