tar
    Preparing search index...

    Class WriteEntry

    An entry to write to an archive, in the shape of a Request: the metadata is in the fields, and the content is body.

    A pack makes one for each path that it reads from the file system and for each entry that it copies from another archive. Make one with content from memory, and give it to Pack.add().

    onWriteEntry gets the entry before its header is written, and can change each field.

    Index

    Constructors

    Properties

    absolute?: string

    The path of the file, for an entry that a pack read from a path.

    atime?: Date
    body?:
        | Blob
        | Uint8Array<ArrayBufferLike>
        | ReadableStream<Uint8Array<ArrayBufferLike>>
        | AsyncIterable<Uint8Array<ArrayBufferLike>, any, any>
        | Iterable<Uint8Array<ArrayBufferLike>, any, any>

    The content. A string is kept as its UTF-8 bytes.

    ctime?: Date
    dev?: number
    gid?: number
    gname?: string
    header?: Header

    The header block, after encode().

    ino?: number
    linkpath?: string
    mode?: number

    The permission bits only.

    mtime?: Date
    nlink?: number
    path: string
    size: number

    The number of bytes in the body. The body must have this many.

    uid?: number
    uname?: string

    Methods

    • Make the header from the fields, and write it to the first 512 bytes of block, which must be zeros. Returns the blocks to write before the body: block, and before it a PAX header entry if a field does not fit the header.

      Parameters

      Returns Uint8Array<ArrayBufferLike>[]