MCPcopy Create free account
hub / github.com/MCSManager/MCSManager / unzip

Method unzip

daemon/src/service/system_file.ts:262–267  ·  view source on GitHub ↗
(sourceZip: string, destDir: string, code?: string)

Source from the content-addressed store, hash-verified

260 }
261
262 async unzip(sourceZip: string, destDir: string, code?: string) {
263 if (!code) code = this.fileCode;
264 if (!this.check(sourceZip) || !this.checkPath(destDir)) throw new Error(ERROR_MSG_01);
265 this.zipFileCheck(this.toAbsolutePath(sourceZip));
266 return await decompress(this.toAbsolutePath(sourceZip), this.toAbsolutePath(destDir), code);
267 }
268
269 async zip(sourceZip: string, files: string[], code?: string) {
270 if (!code) code = this.fileCode;

Callers 6

doneMethod · 0.95
initSteamCmdFunction · 0.80
onStartMethod · 0.80
file_router.tsFile · 0.80
http_router.tsFile · 0.80

Calls 5

checkMethod · 0.95
checkPathMethod · 0.95
zipFileCheckMethod · 0.95
toAbsolutePathMethod · 0.95
decompressFunction · 0.90

Tested by

no test coverage detected