start with init command

This commit is contained in:
grimhilt
2023-05-31 23:08:33 +02:00
parent 66ee1e9191
commit 9341a6db7b
8 changed files with 193 additions and 97 deletions

9
src/commands/init.rs Normal file
View File

@@ -0,0 +1,9 @@
use std::fs::DirBuilder;
pub fn init() {
let builder = DirBuilder::new();
match builder.create("./test/dir") {
Ok(()) => println!("Directory successfuly created"),
Err(_) => println!("Error: cannot create directory"),
}
}