20 #include "recursivedelete.h" 31 extern "C" int deleteFile(
const char*,
const struct stat,
int,
struct FTW *ftwbuf);
41 int deleteFile(
const char* deletePath,
const struct stat* sb,
int typeflag,
struct FTW *ftwbuf)
60 if (nftw(dir.c_str(), deleteFile, 20, FTW_DEPTH) != 0) {
61 log_error() <<
"Failed to recursively delete " << dir;
68 RecursiveDelete::RecursiveDelete() {}
69 RecursiveDelete::~RecursiveDelete() {}
static RecursiveDelete & getInstance()
getInstance Gets the RecursiveDelete instance.
bool del(std::string dir)
delete Delete files from directory
The RecursiveDelete class is a singleton class used to delete files recursively in a directory...
Developers guide to adding a config item: