MCPcopy Create free account
hub / github.com/dobin/RedEdr / write_file

Function write_file

RedEdrShared/utils.cpp:185–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

183
184
185void write_file(std::string path, std::string data) {
186 std::ofstream file(path);
187 if (!file.is_open()) {
188 std::cerr << "Could not open file: " << path << std::endl;
189 return;
190 }
191 file << data;
192 file.close();
193}
194
195
196std::string get_time_for_file() {

Callers 1

SaveToFileMethod · 0.85

Calls 2

closeMethod · 0.80
is_openMethod · 0.45

Tested by

no test coverage detected