Skeudenn / main/services/cbz-archive / CbzArchive
Class: CbzArchive ​
Defined in: src/main/services/cbz-archive.ts:23
A .cbz (ZIP) comic, read entry by entry with node-stream-zip (the file stays open until close()).
Implements ​
Properties ​
fileCount ​
readonlyfileCount:number
Defined in: src/main/services/cbz-archive.ts:35
Total entries in the archive (not just image pages).
Implementation of ​
pages ​
readonlypages: readonlystring[]
Defined in: src/main/services/cbz-archive.ts:34
Image entry names, sorted in reading order.
Implementation of ​
path ​
readonlypath:string
Defined in: src/main/services/cbz-archive.ts:33
Implementation of ​
Methods ​
close() ​
close():
Promise<void>
Defined in: src/main/services/cbz-archive.ts:106
Waits for in-flight reads to settle, then closes the ZIP file.
Returns ​
Promise<void>
Implementation of ​
readPage() ​
readPage(
index):Promise<ComicPage>
Defined in: src/main/services/cbz-archive.ts:59
Reads page index (0-based); throws a RangeError when out of range, or once close() has begun.
Parameters ​
index ​
number
Returns ​
Promise<ComicPage>
Implementation of ​
open() ​
staticopen(filePath):Promise<CbzArchive>
Defined in: src/main/services/cbz-archive.ts:41
Opens and indexes the archive; throws (after closing it) when it holds no image.
Parameters ​
filePath ​
string
Returns ​
Promise<CbzArchive>