tar-xz - v6.1.1
    Preparing search index...

    Interface TarSourceFile

    Input source for archive creation.

    In the Node.js implementation, source may be a string interpreted as an fs path. In the Browser implementation, string sources throw a helpful error (no filesystem access).

    interface TarSourceFile {
        mode?: number;
        mtime?: Date;
        name: string;
        source:
            | string
            | ArrayBuffer
            | Uint8Array<ArrayBufferLike>
            | AsyncIterable<Uint8Array<ArrayBufferLike>, any, any>;
    }
    Index

    Properties

    Properties

    mode?: number

    File mode (default: 0o644)

    mtime?: Date

    Modification time (default: current time)

    name: string

    Path inside the archive

    source:
        | string
        | ArrayBuffer
        | Uint8Array<ArrayBufferLike>
        | AsyncIterable<Uint8Array<ArrayBufferLike>, any, any>

    File content.

    • string — fs path (Node only; rejected in browser)
    • Uint8Array / ArrayBuffer / Buffer — raw bytes
    • AsyncIterable<Uint8Array> — streaming source