Class ZipDirectoryEntry

Represents a directory entry in the zip (Filesystem API).

Hierarchy (view full)

Constructors

Properties

children: ZipEntry[]

The children of the entry.

The underlying EntryMetaData instance.

directory: true

true for ZipDirectoryEntry instances.

id: number

The ID of the instance.

name: string

The relative filename of the entry.

parent?: ZipEntry

The parent directory of the entry.

uncompressedSize: number

The uncompressed size of the content.

Methods

  • Adds a entry entry with content provided as a Data URI string encoded in Base64

    Parameters

    • name: string

      The relative filename of the entry.

    • dataURI: string

      The Data URI string encoded in Base64.

    • Optional options: ZipWriterAddDataOptions

      The options.

    Returns ZipFileEntry<string, string>

    A ZipFileEntry instance.

  • Adds a entry entry with content provided via a ReadableStream instance

    Parameters

    • name: string

      The relative filename of the entry.

    • readable: ReadableStream<any>

      The ReadableStream instance.

    • Optional options: ZipWriterAddDataOptions

      The options.

    Returns ZipFileEntry<ReadableStream<any>, void>

    A ZipFileEntry instance.

  • Adds an entry with content provided as a Uint8Array instance

    Parameters

    • name: string

      The relative filename of the entry.

    • array: Uint8Array

      The Uint8Array instance.

    • Optional options: ZipWriterAddDataOptions

      The options.

    Returns ZipFileEntry<Uint8Array, Uint8Array>

    A ZipFileEntry instance.

  • Tests the password on the entry and all children if any, returns true if the entry is not password protected

    Parameters

    Returns Promise<boolean>

  • Returns a Blob instance containing a zip file of the entry and its descendants

    Parameters

    Returns Promise<Blob>

    A promise resolving to the Blob instance.

  • Returns a Data URI string encoded in Base64 containing a zip file of the entry and its descendants

    Parameters

    Returns Promise<string>

    A promise resolving to the Data URI string encoded in Base64.

  • Returns a Uint8Array instance containing a zip file of the entry and its descendants

    Parameters

    Returns Promise<Uint8Array>

    A promise resolving to the Uint8Array instance.

  • Creates a zip file via a WritableStream instance containing the entry and its descendants

    Parameters

    Returns Promise<WritableStream<any>>

    A promise resolving to the Uint8Array instance.

  • Extracts a zip file provided as a Data URI string encoded in Base64 into the entry

    Parameters

    Returns Promise<[ZipEntry]>

  • Extracts a zip file provided via a ReadableStream instance into the entry

    Parameters

    Returns Promise<[ZipEntry]>

  • Set the name of the entry

    Parameters

    • name: string

      The new name of the entry.

    Returns void