added C++ based nuke tool to nuke dirs/files

This commit is contained in:
patricus 2025-06-30 17:21:55 +02:00
parent 887fa8cdaf
commit ab4fb231e5
5 changed files with 24 additions and 11 deletions

14
nuke.cpp Normal file
View file

@ -0,0 +1,14 @@
#include<filesystem>
#include<iostream>
using namespace std;
int main(int argc, char* argv[])
{
for(int i=1;i<argc;i++){
if(!filesystem::exists(argv[i]))
{
cerr<<"error, no such file or directory";
return 1;
}
filesystem::remove_all(argv[i]);
}
}