MCPcopy Create free account
hub / github.com/ClassiCube/ClassiCube / ZipFile_Create

Function ZipFile_Create

src/Resources.c:271–287  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

269}
270
271static void ZipFile_Create(const cc_string* path, struct ResourceZipEntry* entries, int numEntries) {
272 struct Stream s;
273 cc_filepath raw_path;
274 cc_result res;
275
276 Platform_EncodePath(&raw_path, path);
277 res = Stream_CreatePath(&s, &raw_path);
278 if (res) {
279 Logger_IOWarn2(res, "creating", &raw_path); return;
280 }
281
282 res = ZipFile_WriteEntries(&s, entries, numEntries);
283 if (res) Logger_IOWarn2(res, "making", &raw_path);
284
285 res = s.Close(&s);
286 if (res) Logger_IOWarn2(res, "closing", &raw_path);
287}
288
289
290#ifdef CC_BUILD_NOMUSIC

Callers 2

SoundAsset_CreateZipFunction · 0.85

Calls 4

Stream_CreatePathFunction · 0.85
Logger_IOWarn2Function · 0.85
ZipFile_WriteEntriesFunction · 0.85
Platform_EncodePathFunction · 0.70

Tested by

no test coverage detected