MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / writeFile

Method writeFile

source/game/StarVersioningDatabase.cpp:31–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29}
30
31void VersionedJson::writeFile(VersionedJson const& versionedJson, String const& filename) {
32 DataStreamBuffer ds;
33 ds.writeData(Magic, MagicStringSize);
34 ds.write(versionedJson);
35 File::overwriteFileWithRename(ds.takeData(), filename);
36}
37
38Json VersionedJson::toJson() const {
39 return JsonObject{

Callers

nothing calls this directly

Calls 3

writeDataMethod · 0.45
writeMethod · 0.45
takeDataMethod · 0.45

Tested by

no test coverage detected