diff options
Diffstat (limited to 'commands/src/mkdir.rs')
-rw-r--r-- | commands/src/mkdir.rs | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/commands/src/mkdir.rs b/commands/src/mkdir.rs deleted file mode 100644 index 8fe3383..0000000 --- a/commands/src/mkdir.rs +++ /dev/null @@ -1,19 +0,0 @@ -use toolkit::Toolkit; -use toolkit::error::*; -use crate::parser::Command; - -pub fn run(tk: &mut Toolkit, command: Command) { - if command.names.len() == 1 { - let path = tk.resolve_path(&command.names[0]); - - if !tk.file_exists(&path) { - tk.mkdir(&path); - } else { - display_error(tk, Error::E10); - } - } else if command.names.is_empty() { - display_error(tk, Error::E03); - } else if command.names.len() > 1 { - display_error(tk, Error::E08); - } -}
\ No newline at end of file |