MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / saveDocument

Method saveDocument

framework/serialization/providers/zipdataprovider.cpp:100–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98 return true;
99}
100bool ZipDataProvider::saveDocument(const UString &path, const UString &contents)
101{
102 if (!mz_zip_writer_add_mem(&archive, path.c_str(), contents.c_str(), contents.length(),
103 MZ_DEFAULT_COMPRESSION))
104 {
105 LogWarning("Failed to insert \"%s\" into zip file \"%s\"", path, this->zipPath);
106 return false;
107 }
108 return true;
109}
110bool ZipDataProvider::finalizeSave()
111{
112 if (writing)

Callers 1

writeMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected