MCPcopy Create free account
hub / github.com/VitalAudio/visage / replaceFileWithText

Function replaceFileWithText

visage_utils/file_system.cpp:63–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61 }
62
63 bool replaceFileWithText(const File& file, const std::string& text) {
64 std::ofstream stream(file, std::ios::binary);
65 if (!stream)
66 return false;
67
68 stream << text;
69 if (stream.fail())
70 return false;
71
72 return true;
73 }
74
75 bool hasWriteAccess(const File& file) {
76 std::filesystem::file_status status = std::filesystem::status(file);

Callers 3

compileShaderMethod · 0.85
startDragDropSourceMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected