The children of the entry.
OptionaldataThe underlying EntryMetaData instance.
void for ZipFileEntry instances.
The ID of the instance.
The relative filename of the entry.
Optional ReadonlyoptionsThe options applied to the entry when the zip file is exported.
These are the options passed when the entry was added to the filesystem, updated by ZipEntry#setOptions. An entry imported from a zip file has none until ZipEntry#setOptions is called.
OptionalparentThe parent directory of the entry.
The Reader instance used to read the content of the entry.
The uncompressed size of the content.
It is the size of the raw compressed content when the entry has been imported with the
passThrough option set to true, since the entry holds the compressed data in that case. The
uncompressed size of the original entry remains available in ZipEntry#data.
It is updated by the {@link ZipFileEntry}#replace*() methods, and it is 0 for an entry holding
a ReadableStream instance, whose size is only known once the entry has been read.
The Writer instance used to write the content of the entry.
Tests the password on the entry and all children if any, returns true if the entry is not password protected
Optionaloptions: EntryGetDataOptionsClones the entry
OptionaldeepClone: boolean
true to clone all the descendants.
Retrieves the content of the entry as an ArrayBuffer instance
Optionaloptions: EntryGetDataOptions
The options.
A promise resolving to an ArrayBuffer instance.
Retrieves the content of the entry as a Blob instance
OptionalmimeType: string
The MIME type of the content.
Optionaloptions: EntryGetDataOptions
The options.
A promise resolving to a Blob instance.
Retrieves the content of the entry via a Writer instance
The Writer instance.
Optionaloptions: EntryGetDataOptions
The options.
A promise resolving to data associated to the Writer instance.
Retrieves the content of the entry as as a Data URI string encoded in Base64
OptionalmimeType: string
The MIME type of the content.
Optionaloptions: EntryGetDataOptions
The options.
A promise resolving to a Data URI string encoded in Base64.
Returns the full filename of the entry
Returns the filename of the entry relative to a parent directory
Retrieves the text content of the entry as a string
Optionalencoding: string
The encoding of the text.
Optionaloptions: EntryGetDataOptions
The options.
A promise resolving to a string.
Retrieves the content of the entry as a Uint8Array instance
Optionaloptions: EntryGetDataOptions
The options.
A promise resolving to a Uint8Array instance.
Retrieves the content of the entry via a WritableStream instance
Optionalwritable: WritableStream<any>
The WritableStream instance.
Optionaloptions: EntryGetDataOptions
The options.
A promise resolving to the WritableStream instance.
Tests if a ZipDirectoryEntry instance is an ancestor of the entry
The ZipDirectoryEntry instance.
Tests if the entry or any of its children is password protected
Set the name of the entry
The new name of the entry.
A name holding "/" is split into path components, like the name passed to a
{@link ZipDirectoryEntry}#add*() method, so it moves the entry into the directories it names,
creating them when they do not exist. Renaming an entry to the name it already has does nothing.
Renaming it onto an existing sibling throws an ERR_ENTRY_EXISTS error, and renaming it
into itself or into one of its descendants throws.
Replaces the content of the entry with a Blob instance
The Blob instance.
Replaces the content of the entry with a Data URI string encoded in Base64
The Data URI string encoded in Base64.
Replaces the content of the entry with a ReadableStream instance
The ReadableStream instance.
The size of a ReadableStream instance is unknown, so the entry reports an undetermined
size, like an entry added with ZipDirectoryEntry#addReadable. ZipFS#getExportedSize
then throws an ERR_UNDETERMINED_SIZE error instead of returning a size it cannot predict.
Replaces the content of the entry with a string
The string.
Replaces the content of the entry with a Uint8Array instance
The Uint8Array instance.
Sets the options applied to the entry when the zip file is exported
The options.
The options are merged into ZipEntry#options, and an option set to undefined is removed
from it instead of being stored. They take precedence over the options passed to
{@link ZipDirectoryEntry}#export*() and over the metadata of the entry they were imported from,
exactly like the options passed when adding an entry to the filesystem.
The options describing the data of an entry exported as-is, e.g. ZipWriterConstructorOptions#compressionMethod and ZipWriterAddDataOptions#uncompressedSize, are ignored: they are always the ones of the original entry. The ZipWriterAddDataOptions#directory option and the progress callbacks are ignored as well. Invalid option values are reported when the zip file is exported.
Represents a file entry in the zip (Filesystem API).
Remarks
A
{@link ZipFileEntry}#replace*()method describes the entry with the content it is given: it updates ZipEntry#uncompressedSize and clears the pass-through state of an entry imported with the ZipReaderOptions#passThrough option, since the bytes copied verbatim are gone. Replacing the content of an entry therefore keeps ZipFS#getExportedSize exact.