MCPcopy Create free account
hub / github.com/VCVRack/Rack / removeRecursively

Function removeRecursively

src/system.cpp:195–208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

193
194
195int removeRecursively(const std::string& pathStr) {
196 fs::path path = fs::u8path(pathStr);
197 try {
198 // Make all entries writable before attempting to remove
199 for (auto& entry : fs::recursive_directory_iterator(path)) {
200 fs::permissions(entry.path(), fs::perms::owner_write, fs::perm_options::add);
201 }
202
203 return fs::remove_all(path);
204 }
205 catch (fs::filesystem_error& e) {
206 return 0;
207 }
208}
209
210
211std::string getWorkingDirectory() {

Callers 2

clearAutosaveMethod · 0.85
cleanAutosaveMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected