MultiArchive¶
only mutool run
Constructors¶
- class MultiArchive()¶
Create a new empty multi archive.
var multiArchive = new mupdf.MultiArchive()
Instance methods¶
- MultiArchive.prototype.mountArchive(subArchive, path)¶
Add an archive to the set of archives handled by a multi archive. If
pathisnull, thesubArchivecontents appear at the top-level, otherwise they will appear prefixed by the stringpath.- Arguments:
subArchive (
Archive) – An archive that will be a child archive of this one.path (
string) – The path at which the archive will be inserted.
In the following example
example1.zipcontainsfile1.txtandexample2.zipcontainsfile2.txt. The MultiArchive now lets you access bothfile1.txtandsubpath/file2.txt:var archive = new mupdf.MultiArchive() archive.mountArchive(new mupdf.Archive("example1.zip"), null) archive.mountArchive(new mupdf.Archive("example2.zip"), "subpath") console.log(archive.hasEntry("file1.txt")) console.log(archive.hasEntry("subpath/file2.txt"))