| namespace sys { | namespace sys { | ||||
| static thread_local std::unordered_set<std::string> mkdirp_set; | |||||
| FileInfo fileInfo(const std::string &path) { | FileInfo fileInfo(const std::string &path) { | ||||
| FileInfo finfo; | FileInfo finfo; | ||||
| } | } | ||||
| void mkdirp(const std::string &path) { | void mkdirp(const std::string &path) { | ||||
| static thread_local std::unordered_set<std::string> set; | |||||
| auto res = set.emplace(path); | |||||
| auto res = mkdirp_set.emplace(path); | |||||
| if (!res.second) | if (!res.second) | ||||
| return; | return; | ||||
| } | } | ||||
| void rmrf(const std::string &path) { | void rmrf(const std::string &path) { | ||||
| mkdirp_set.erase(path); | |||||
| // TODO: Implement this in C++ instead | // TODO: Implement this in C++ instead | ||||
| std::vector<std::string> argv; | std::vector<std::string> argv; | ||||
| argv.push_back("rm"); | argv.push_back("rm"); |