16 lines
No EOL
366 B
JavaScript
16 lines
No EOL
366 B
JavaScript
import Command from "../command.js";
|
|
|
|
export const mkdir = new Command("mkdir")
|
|
.setManual({
|
|
purpose: "Create directory"
|
|
})
|
|
.setRequireArgs(true)
|
|
.setExecute((args, { currentDirectory }) => {
|
|
const name = args[0];
|
|
|
|
if (currentDirectory.findSubFolder(name))
|
|
return { blank: true };
|
|
|
|
currentDirectory.createFolder(name);
|
|
return { blank: true };
|
|
}); |