aboutsummaryrefslogtreecommitdiff
path: root/lockchain-files/src/load.rs
blob: 034d6166a4e6325e7bfc232ce841855088df6cb3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
//! A small submodule which handles all aspects of vault creation
#![allow(unused_imports)]

use crate::lcc::errors::VaultError;
use crate::lcc::{traits::Body, Generator};
use std::collections::HashMap;

use crate::FileVault;
use crate::config::{VaultConfig, ConfigError};
use crate::fs::Filesystem;


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()
    }

}