MCPcopy Create free account
hub / github.com/Samsung/UTopia / saveFile

Function saveFile

lib/utils/FileUtil.cpp:65–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63}
64
65bool saveFile(const char *filePath, const char *buffer) {
66 std::ofstream outputFile(filePath);
67 if (outputFile.is_open()) {
68 outputFile << buffer;
69 std::cout << "Saved File : " << filePath
70 << ", Size : " << outputFile.tellp() << std::endl;
71 return true;
72 } else {
73 std::cerr << "Failed Save File" << std::endl;
74 return false;
75 }
76}
77
78std::string readFile(const char *filePath) {
79 std::ifstream inputFile(filePath);

Callers 7

saveReportMethod · 0.85
genEntryMethod · 0.85
generateCorpusMethod · 0.85
genModifiedSrcsMethod · 0.85
TESTFunction · 0.85
addMethod · 0.85
createFileMethod · 0.85

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.68