Compare commits

..

No commits in common. "795462120d2869652987680795e9cc43d7aac0b3" and "f03c42f8f758c7087a4646b5d5e5b142c9899291" have entirely different histories.

2 changed files with 8 additions and 19 deletions

View File

@ -68,24 +68,15 @@ 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 ensure_exists(path: String) {
let p = Path::new(&path);
if !p.exists() {
fs::create_dir_all(p).expect("couldn't create folder")
}
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 archives: String,
pub folders: String,
pub game_folder: String,
pub latest_date: String,
pub cache_folder: String,
}

View File

@ -1,4 +1,4 @@
use std::{path::Path, fs::{File, self}};
use std::{path::Path, fs::File};
use clap::Parser;
use compress_tools::*;
@ -21,6 +21,4 @@ fn main() {
println!("Config: {}", config_location);
println!("Steam: {}", steam_location);
cyber_mod_manager::create_config(&format!("{config_location}/CyberModManager/config.json"));
}