MCPcopy Create free account
hub / github.com/ClassicOldSong/Apollo / write_file

Function write_file

src/file_handler.cpp:45–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43 }
44
45 int write_file(const char *path, const std::string_view &contents) {
46 std::ofstream out(path);
47
48 if (!out.is_open()) {
49 return -1;
50 }
51
52 out << contents;
53
54 return 0;
55 }
56} // namespace file_handler

Callers 7

saveAppFunction · 0.85
reorderAppsFunction · 0.85
deleteAppFunction · 0.85
saveConfigFunction · 0.85
migrateFunction · 0.85
create_credsFunction · 0.85
TEST_PFunction · 0.85

Calls

no outgoing calls

Tested by 1

TEST_PFunction · 0.68