MCPcopy Create free account
hub / github.com/codereader/DarkRadiant / replaceFileContents

Function replaceFileContents

test/algorithm/FileUtils.h:50–56  ·  view source on GitHub ↗

Writes the given contents to the given path, overwriting it

Source from the content-addressed store, hash-verified

48
49// Writes the given contents to the given path, overwriting it
50inline 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
59inline std::string loadTextFromVfsFile(const std::string& vfsPath)

Callers 4

replacePropertiesBlockFunction · 0.85
TEST_FFunction · 0.85
TEST_FFunction · 0.85
setContentsMethod · 0.85

Calls 2

flushMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected