MCPcopy Create free account
hub / github.com/approvals/ApprovalTests.cpp / writeToFile

Method writeToFile

ApprovalTests/utilities/FileUtils.cpp:89–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87 }
88
89 void FileUtils::writeToFile(const std::string& filePath, const std::string& content)
90 {
91 std::ofstream out(filePath.c_str(), std::ios::binary | std::ofstream::out);
92 if (!out)
93 {
94 throw std::runtime_error("Unable to write file: " + filePath);
95 }
96 out << content;
97 }
98
99}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected