Writes the given contents to the given path, overwriting it
| 48 | |
| 49 | // Writes the given contents to the given path, overwriting it |
| 50 | inline void replaceFileContents(const std::string& path, const std::string& contents) |
| 51 | { |
| 52 | std::ofstream stream(path, std::ofstream::out); |
| 53 | stream << contents; |
| 54 | stream.flush(); |
| 55 | stream.close(); |
| 56 | } |
| 57 | |
| 58 | // Loads the entire text from the given vfs file into a string |
| 59 | inline std::string loadTextFromVfsFile(const std::string& vfsPath) |
no test coverage detected