init
This commit is contained in:
parent
a2ddf50bed
commit
f6a7695561
@ -1,13 +1,13 @@
|
|||||||
use Fasching::snapshot::Snapshot;
|
use Fasching::snapshot::Snapshot;
|
||||||
use crate::syscompare::Comparer;
|
use crate::syscompare::Comparer;
|
||||||
|
|
||||||
struct CreateMode {
|
pub struct CreateMode {
|
||||||
path: String,
|
path: String,
|
||||||
snapshot: Snapshot
|
snapshot: Snapshot
|
||||||
}
|
}
|
||||||
|
|
||||||
impl CreateMode {
|
impl CreateMode {
|
||||||
fn new() -> CreateMode {
|
pub fn new(path: &String) -> CreateMode {
|
||||||
CreateMode { path: "".to_string(), snapshot: Default::default() }
|
CreateMode { path: "".to_string(), snapshot: Default::default() }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
use std::env::args;
|
||||||
use std::sync::{Arc, Mutex};
|
use std::sync::{Arc, Mutex};
|
||||||
use Fasching::snapshot::Snapshot;
|
use Fasching::snapshot::Snapshot;
|
||||||
|
use crate::createmode::CreateMode;
|
||||||
|
|
||||||
pub enum CompareMode {
|
pub enum CompareMode {
|
||||||
Create,
|
Create,
|
||||||
@ -20,6 +22,17 @@ impl SysCompareApp {
|
|||||||
}
|
}
|
||||||
pub fn run(&self) {
|
pub fn run(&self) {
|
||||||
println!("running");
|
println!("running");
|
||||||
|
match self.mode {
|
||||||
|
CompareMode::Create => {
|
||||||
|
let path = match self.args.get(2) {
|
||||||
|
None => {panic!("Missing creation path as second argument")}
|
||||||
|
Some(r) => {r}
|
||||||
|
};
|
||||||
|
let create = CreateMode::new(path);
|
||||||
|
create.run()
|
||||||
|
}
|
||||||
|
CompareMode::Compare => {}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user