From 795462120d2869652987680795e9cc43d7aac0b3 Mon Sep 17 00:00:00 2001 From: SadlyNotSappho Date: Tue, 25 Jul 2023 15:31:38 -0700 Subject: [PATCH] update config struct to actually reflect whats in the config file and add psuedocode for the three main functions --- src/lib.rs | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 4c9e2db..dd43b97 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -68,8 +68,24 @@ pub fn read_config(file: &String) -> Config { serde_json::from_str(&read[..]).expect("couldn't parse json") } +pub fn unzip(cfg: Config) { + // get all files in cfg.archives + // unzip them all into cfg.folders +} + +pub fn deploy(cfg: Config) { + // get all folders in cfg.folders + // copy the contents of them into cfg.game_folder +} + +pub fn undeploy(cfg: Config) { + // get all folders in cfg.folders + // remove the contents of all of them from cfg.game_folder +} + #[derive(Serialize, Deserialize)] pub struct Config { - pub latest_date: String, - pub cache_folder: String, + pub archives: String, + pub folders: String, + pub game_folder: String, }