This commit is contained in:
parent
417e505750
commit
3618a41bcd
@ -22,3 +22,4 @@ luna_app(ls.cpp ls OFF)
|
||||
luna_app(chown.cpp chown OFF)
|
||||
luna_app(chmod.cpp chmod OFF)
|
||||
luna_app(mkdir.cpp mkdir OFF)
|
||||
luna_app(rm.cpp rm OFF)
|
||||
|
17
apps/rm.cpp
Normal file
17
apps/rm.cpp
Normal file
@ -0,0 +1,17 @@
|
||||
#include <os/ArgumentParser.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
StringView path;
|
||||
|
||||
os::ArgumentParser parser;
|
||||
parser.add_positional_argument(path, "path"_sv, true);
|
||||
parser.parse(argc, argv);
|
||||
|
||||
if (remove(path.chars()) < 0)
|
||||
{
|
||||
perror("rm");
|
||||
return 1;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user