tar
    Preparing search index...

    Type Alias PackOptionsBase<E>

    PackOptionsBase: WarnOptions & {
        brotli?: boolean | Record<string, unknown>;
        codecs?: Codec[];
        compress?: Codec | [codec: Codec, options: Record<string, unknown>];
        cwd?: string;
        filter?: (path: string, entry: CreateStats | E) => boolean;
        follow?: boolean;
        gzip?: boolean | Record<string, unknown>;
        maxReadSize?: number;
        mtime?: Date;
        noDirRecurse?: boolean;
        noMtime?: boolean;
        noPax?: boolean;
        onWriteEntry?: (entry: WriteEntry) => unknown;
        platform?: "win32" | "posix";
        portable?: boolean;
        prefix?: string;
        preservePaths?: boolean;
        processUid?: number;
        processUname?: string;
        zstd?: boolean | Record<string, unknown>;
    }

    The options that Pack and PackSync share.

    Type Parameters

    Type Declaration

    • Optionalbrotli?: boolean | Record<string, unknown>

      Compress with the codec named brotli in codecs.

    • Optionalcodecs?: Codec[]

      Compression formats, before the gzip support of the runtime. The options gzip, brotli, and zstd select the first codec that has that name.

    • Optionalcompress?: Codec | [codec: Codec, options: Record<string, unknown>]

      Compress with this codec. It does not need to be in codecs. With a pair, the second item is given to the compress function of the codec.

    • Optionalcwd?: string

      The absolute path of the directory that the paths to add are relative to. A pack needs it, and fs, to add a path. A path that is not absolute is a TypeError.

    • Optionalfilter?: (path: string, entry: CreateStats | E) => boolean

      Called with each path and its lstat result (its stat result with follow), and with each entry of another archive. If it returns false, the path or the entry is not added.

    • Optionalfollow?: boolean

      Add the target of a symbolic link, not the link.

    • Optionalgzip?: boolean | Record<string, unknown>

      Compress with the codec named gzip.

    • OptionalmaxReadSize?: number

      The most bytes to read from a file at one time. Default, and with 0, 16 MiB. A positive integer, or Infinity. A larger file is not read before the pack comes to it.

    • Optionalmtime?: Date

      The mtime of each entry.

    • OptionalnoDirRecurse?: boolean

      Add a directory without the entries in it.

    • OptionalnoMtime?: boolean

      Write no mtime.

    • OptionalnoPax?: boolean

      Write no PAX header for a field that does not fit the header.

    • OptionalonWriteEntry?: (entry: WriteEntry) => unknown

      Called with each entry before its header is written. It can change the fields of the entry.

    • Optionalplatform?: "win32" | "posix"

      With 'win32', each \ in a path is changed to /, and the characters that winchars encodes are decoded.

    • Optionalportable?: boolean

      Leave out the data that is specific to one system: uid, gid, uname, gname, atime, ctime, dev, ino, nlink, and the mtime of a directory. Remove the write permission of the group and of others.

    • Optionalprefix?: string

      A directory to put before the path of each entry.

    • OptionalpreservePaths?: boolean

      Keep a root at the start of a path, such as /.

    • OptionalprocessUid?: number

      The user ID of the process.

    • OptionalprocessUname?: string

      The uname of each file that processUid owns.

    • Optionalzstd?: boolean | Record<string, unknown>

      Compress with the codec named zstd in codecs.