tar
    Preparing search index...

    Type Alias UnpackOptions

    The options of the extraction that are not about the archive data or the file system functions.

    type UnpackOptions = {
        chmod?: boolean;
        cwd: string;
        dmode?: number;
        fmode?: number;
        forceChown?: boolean;
        gid?: number;
        keep?: boolean;
        maxDepth?: number;
        newer?: boolean;
        noMtime?: boolean;
        platform?: "win32" | "posix";
        preserveOwner?: boolean;
        preservePaths?: boolean;
        processGid?: number;
        processUid?: number;
        processUmask?: number;
        strip?: number;
        uid?: number;
        umask?: number;
        unlink?: boolean;
    }
    Index

    Properties

    chmod?: boolean

    Set the mode of each directory with chmod, so that the umask of the process does not change it.

    cwd: string

    The absolute path of the directory to extract into.

    dmode?: number

    The mode of a directory that has no mode in the archive.

    fmode?: number

    The mode of a file that has no mode in the archive.

    forceChown?: boolean

    Set the owner of each entry, also when it is the process owner.

    gid?: number

    Set the owner of each entry to this group. Needs uid.

    keep?: boolean

    Do not write over an existing file.

    maxDepth?: number

    The most parts that a path or a link target can have. Default 1024. Infinity removes the limit.

    newer?: boolean

    Do not write over a file that is newer than the entry.

    noMtime?: boolean

    Do not set the times of the entries.

    platform?: "win32" | "posix"

    With 'win32': the path rules of Windows, the characters <|>?: in a name are changed to private-use characters, a file is renamed before it is removed, and one entry is extracted at a time.

    preserveOwner?: boolean

    Set the owner of each entry to the uid and gid in the archive. Default: true if processUid is 0 and uid is not set.

    preservePaths?: boolean

    Permit absolute paths, .. in paths, and extraction through symbolic links. This is not safe with an archive that is not trusted.

    processGid?: number

    The group ID of the process.

    processUid?: number

    The user ID of the process.

    processUmask?: number

    The umask of the process. Only used with chmod. Default 0o22.

    strip?: number

    Remove this number of leading parts from each path.

    uid?: number

    Set the owner of each entry to this user. Needs gid.

    umask?: number

    Sets the default of dmode and fmode. Default: processUmask.

    unlink?: boolean

    Remove a file before the entry is written, in place of a write into the existing file. Also remove a symbolic link in the path to an entry.