MCPcopy Create free account
hub / github.com/BoomingTech/Piccolo / saveFile

Function saveFile

engine/source/meta_parser/parser/meta/meta_utils.cpp:266–280  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

264 }
265
266 void saveFile(const std::string& outpu_string, const std::string& output_file)
267 {
268 fs::path out_path(output_file);
269
270 if (!fs::exists(out_path.parent_path()))
271 {
272 fs::create_directories(out_path.parent_path());
273 }
274 std::fstream output_file_stream(output_file, std::ios_base::out);
275
276 output_file_stream << outpu_string << std::endl;
277 output_file_stream.flush();
278 output_file_stream.close();
279 return;
280 }
281
282 void replaceAll(std::string& resource_str, std::string sub_str, std::string new_str)
283 {

Callers 4

generateMethod · 0.85
finishMethod · 0.85
generateMethod · 0.85
finishMethod · 0.85

Calls 2

flushMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected