mod ds_hashmap;
pub use ds_hashmap::DSHashmap;
use crate::fs::{Folder, SortBy};
use std::path::PathBuf;
pub trait DataStore<T> {
fn new() -> Self;
fn get_current_path(&mut self) -> &T;
fn set_current_path(&mut self, path: &T);
fn has_path(&self, path: &T) -> bool;
fn get_current_folder(&self) -> Option<&Folder>;
fn get_current_folder_mut(&mut self) -> Option<&mut Folder>;
fn get_folder_mut(&mut self, path: &T) -> Option<&mut Folder>;
fn set_folder(&mut self, path: &T, folder: Folder);
fn set_current_folder(&mut self, folder: Folder);
fn sort_current_folder(&mut self, sort_by: SortBy);
fn move_to_parent(&mut self);
fn move_to_child(&mut self, title: &str);
fn remove_path(&mut self, path: &T);
fn get_entry_size(&mut self, path: &T) -> Option<u64>;
fn get_nodes_len(&self) -> usize;
fn get_keys(&mut self) -> Vec<T>;
}
pub type DataStoreKey = PathBuf;
pub type DataStoreType = DSHashmap;