| 208 | } |
| 209 | |
| 210 | bool writeString(const std::string& filepath, const std::string& content) { |
| 211 | std::ofstream fileStream(filepath); |
| 212 | |
| 213 | if (!fileStream.is_open()) { |
| 214 | return false; |
| 215 | } |
| 216 | |
| 217 | fileStream << content; |
| 218 | fileStream.close(); |
| 219 | |
| 220 | return true; |
| 221 | } |
| 222 | |
| 223 | static bool findOrCreateDirectoryInternal(std::string path, mode_t mode) { |
| 224 | auto lock = getLock(path)->asScopedLock(); |