update config struct to actually reflect whats in the config file and add psuedocode for the three main functions
This commit is contained in:
parent
315d3b735e
commit
795462120d
20
src/lib.rs
20
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,
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue