Tankōbon / main/services/cbz-archive / CbzArchive
Class: CbzArchive
Defined in: main/services/cbz-archive.ts:13
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: main/services/cbz-archive.ts:25
Total entries in the archive (not just image pages).
Implementation of
pages
readonlypages: readonlystring[]
Defined in: main/services/cbz-archive.ts:24
Image entry names, sorted in reading order.
Implementation of
path
readonlypath:string
Defined in: main/services/cbz-archive.ts:23
Implementation of
Methods
close()
close():
Promise<void>
Defined in: main/services/cbz-archive.ts:72
Waits for in-flight reads to settle, then closes the ZIP file.
Returns
Promise<void>
Implementation of
readPage()
readPage(
index):Promise<ComicPage>
Defined in: main/services/cbz-archive.ts:49
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: main/services/cbz-archive.ts:31
Opens and indexes the archive; throws (after closing it) when it holds no image.
Parameters
filePath
string
Returns
Promise<CbzArchive>