Luna/apps/rm.cpp

18 lines
316 B
C++
Raw Normal View History

2023-04-12 16:11:43 +00:00
#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;
}
}