(content: InputFileFormat)
| 101 | } |
| 102 | |
| 103 | async loadAsync(content: InputFileFormat): Promise<this> { |
| 104 | const reader: ZipRandomAccessReader = await openZip(await toZipSource(await content), { pathMode: "unsafe" }); |
| 105 | this.files = {}; |
| 106 | try { |
| 107 | for (const entry of reader.entries) { |
| 108 | if (entry.isDirectory) { |
| 109 | continue; |
| 110 | } |
| 111 | this.files[entry.path] = new JSZippZipObject(entry.path, await entry.bytes(), entry.modifiedAt); |
| 112 | } |
| 113 | } finally { |
| 114 | await reader.close(); |
| 115 | } |
| 116 | return this; |
| 117 | } |
| 118 | |
| 119 | generateAsync(options: JSZipGenerateOptions & { type: "blob" }): Promise<Blob>; |
| 120 |
no test coverage detected