ProzillaOS/src/features/apps/terminal/commands/mkdir.js
2023-12-23 15:48:17 +01:00

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 };
});