blob: 56908d3975a9bc7d32d6b6dea99f33164c2a02ee (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#include <App/ShellApp.proto.h>
#include <Binding/FSNode.class.h>
class mkdir : public ShellApp {
public:
mkdir() : ShellApp("mkdir", "Create a/some directory/ies") {}
int run() {
if (args.size() == 0) outvt << "Usage: mkdir <name> [<name> ...]\n";
for (u32int i = 0; i < args.size(); i++) {
if (!FS::mkdir(args[i], FS::cwdNode()).valid()) {
outvt << "Error while creating directory " << args[i] << "\n";
}
}
}
};
APP(mkdir);
|