update config struct to actually reflect whats in the config file and add psuedocode for the three main functions

This commit is contained in:
SadlyNotSappho 2023-07-25 15:31:38 -07:00
parent 315d3b735e
commit 795462120d
1 changed files with 18 additions and 2 deletions

View File

@ -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,
}