generated from ztimson/template
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4278ea9df9 |
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ztimson/zim-utils",
|
"name": "@ztimson/zim-utils",
|
||||||
"version": "0.1.4",
|
"version": "0.1.5",
|
||||||
"description": "Native, dependency-light ZIM archive reader/searcher and Kiwix catalog downloader for Node.js",
|
"description": "Native, dependency-light ZIM archive reader/searcher and Kiwix catalog downloader for Node.js",
|
||||||
"author": "Zak Timson",
|
"author": "Zak Timson",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|||||||
@@ -86,6 +86,12 @@ export class ZimManager {
|
|||||||
return zimCatalog(search, opts);
|
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. */
|
/** Checks whether a local ZIM has a newer version in the catalog, without downloading. */
|
||||||
async isOutdated(file) {
|
async isOutdated(file) {
|
||||||
const meta = await this.#readMeta(file);
|
const meta = await this.#readMeta(file);
|
||||||
|
|||||||
Reference in New Issue
Block a user