@obsidize/tar-browserify
    Preparing search index...

    Class ArchiveWriter

    Generic utility for building a tar octet stream by adding JSON-style entries. See the add***() options in this class definition for details.

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    entries: ArchiveEntry[] = []

    Methods

    • Convenience option for building tarball data

      Parameters

      • path: string

        the file name, e.g. './relative/path/to/your/file.bin'

      • content: Uint8Array

        the content of the file (shocker!)

      • headerOptions: Partial<UstarHeaderLike> = {}

        custom options for this entry

      Returns this

      this for operation chaining

    • Convenience option for building tarball data

      Parameters

      • path: string

        the directory name, e.g. './relative/path/to/your/dir'

      • headerOptions: Partial<UstarHeaderLike> = {}

        custom options for this entry

      Returns this

      this for operation chaining

    • Convenience for appending a new entry to the existing entries array.

      Parameters

      • header: Partial<UstarHeaderLike>
      • Optionalcontent: Uint8Array<ArrayBufferLike>

      Returns this

      this for operation chaining

    • Convenience option for building tarball data

      Parameters

      • path: string

        the file name, e.g. './relative/path/to/your/file.txt'

      • content: string

        the content of the file (shocker!)

      • OptionalheaderOptions: Partial<UstarHeaderLike>

        custom options for this entry

      Returns this

      this for operation chaining

    • Convenience option for cleaning the header of each listed entry. When headers are "cleaned", unknown PAX properties will be removed (e.g. unwanted MacOS "quarantine" headers), and USTAR fields will be normalized (if necessary).

      Returns this