From 345e1bffebfdee18e8744d7fe4f0d41970f34ee6 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Sun, 17 Jan 2016 16:04:31 +0100 Subject: [PATCH] Add Store::new() --- libimagstore/src/store.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libimagstore/src/store.rs b/libimagstore/src/store.rs index 1385584b..be24754c 100644 --- a/libimagstore/src/store.rs +++ b/libimagstore/src/store.rs @@ -114,6 +114,15 @@ pub struct Store { } impl Store { + + /// Create a new Store object + pub fn new(location: PathBuf) -> Store { + Store { + location: location, + entries: Arc::new(RwLock::new(HashMap::new())), + } + } + /// Creates the Entry at the given location (inside the entry) pub fn create(&self, entry: Entry) -> Result<()> { unimplemented!();