From 796e48bef6f285dec8036d9109b44f4c7df1d251 Mon Sep 17 00:00:00 2001 From: Victor Roest Date: Mon, 3 Aug 2020 12:24:26 +0200 Subject: [PATCH] Merge branch 'interface' of github.com:finitum/dspfs into interface --- src/dspfs/api.rs | 1 + src/fs/group/store.rs | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/dspfs/api.rs b/src/dspfs/api.rs index d4e9a79..d25a9c6 100644 --- a/src/dspfs/api.rs +++ b/src/dspfs/api.rs @@ -72,6 +72,7 @@ pub trait Api { // TODO: async fn add_folder(&self, guuid: Uuid, path: &Path) -> Result<()> { + assert!(path.is_dir()); todo!() } } diff --git a/src/fs/group/store.rs b/src/fs/group/store.rs index 785ef54..9703aeb 100644 --- a/src/fs/group/store.rs +++ b/src/fs/group/store.rs @@ -25,7 +25,10 @@ pub trait GroupStore: Send + Sync { /// Gets a specific file given a filehash fn get_file(&self, hash: Hash) -> Result>; + /// Gets the list of all files fn list_files(&self) -> Result>; + + /// Gets the file tree of a specific user fn get_filetree(&self, user: &PublicUser) -> Result; /// Changes a user's file from old to new.