Class ZipDirectoryEntry

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

Hierarchy (View Summary)

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 via a ReadableStream instance

    Parameters

    • name: string

      The relative filename of the entry.

    • readable: ReadableStream<any>

      The ReadableStream instance.

    • Optionaloptions: 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<ArrayBufferLike>

      The Uint8Array instance.

    • Optionaloptions: ZipWriterAddDataOptions

      The options.

    Returns ZipFileEntry<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>

    A ZipFileEntry instance.

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

    Parameters

    Returns Promise<Uint8Array<ArrayBufferLike>>

    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.

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

    Parameters

    Returns Promise<unknown>

    A promise resolving to the data.

  • Set the name of the entry

    Parameters

    • name: string

      The new name of the entry.

    Returns void