generated from ztimson/template
Added delete
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user