| 193 | |
| 194 | |
| 195 | int 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 | |
| 211 | std::string getWorkingDirectory() { |
no outgoing calls
no test coverage detected