MCPcopy Create free account
hub / github.com/CppMicroServices/CppMicroServices / WriteToFile

Function WriteToFile

compendium/tools/SCRCodeGen/Util.cpp:55–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53 }
54
55 void
56 WriteToFile(std::string const& filePath, std::string const& content)
57 {
58 auto fileStream = std::ofstream(filePath, std::ofstream::binary | std::ofstream::out);
59 if (!fileStream.is_open())
60 {
61 throw std::runtime_error("Could not open out file at " + filePath);
62 }
63 fileStream << content;
64 fileStream.close();
65 }
66 } // namespace util
67} // namespace codegen

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected