ProzillaOS/src/features/apps/terminal/commands/mkdir.ts
2024-05-07 21:06:07 +02:00

16 lines
No EOL
363 B
TypeScript

import Command from "../command";
export const mkdir = new Command()
.setManual({
purpose: "Create a directory"
})
.setRequireArgs(true)
.setExecute(function(args, { currentDirectory }) {
const name = args[0];
if (currentDirectory.findSubFolder(name))
return { blank: true };
currentDirectory.createFolder(name);
return { blank: true };
});