Added delete
All checks were successful
Publish Library / Build NPM Project (push) Successful in 9s
Publish Library / Tag Version (push) Successful in 8s

This commit is contained in:
2026-08-22 13:01:19 -04:00
parent 86730f1de8
commit 4278ea9df9
2 changed files with 7 additions and 1 deletions

View File

@@ -86,6 +86,12 @@ export class ZimManager {
return zimCatalog(search, opts);
}
async delete(fileOrName) {
const file = await this.#resolveFile(fileOrName);
await fs.promises.unlink(file);
return {file, status: 'deleted'};
}
/** Checks whether a local ZIM has a newer version in the catalog, without downloading. */
async isOutdated(file) {
const meta = await this.#readMeta(file);