@zip.js/zip.js
    Preparing search index...

    Class ZipDirectoryEntry

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

    Hierarchy (View Summary)

    Index

    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 an entry with content provided as a Uint8Array instance

      Parameters

      • name: string

        The relative filename of the entry.

      • array: Uint8Array<ArrayBuffer>

        The Uint8Array instance.

      • Optionaloptions: ZipWriterAddDataOptions

        The options.

      Returns ZipFileEntry<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>

      A ZipFileEntry 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