start with init command
This commit is contained in:
9
src/commands/init.rs
Normal file
9
src/commands/init.rs
Normal 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"),
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user