C.82 UntarTask
Prev | Appendix C. Optional tasks | Next

## C.82 UntarTask

The `UntarTask` unpacks one or more tar archives.

Table C.112: Attributes

Name | Type | Description | Default | Required
--- | --- | --- | --- | ---
`file` | `String` | Archive filename | n/a | No
`todir` | `String` | Directory to unpack the archive(s) to | none | Yes
`removepath` | `String` | Path to remove from files in the archive(s) | none | No
`forceExtract` | `Boolean` | When set to false, only extract files if the destination does not exist yet or is older than the archive. When set to true, always extract files. | `false` | No
`preservePermissions` | `Boolean` | When set to true, preserve permissions (mode, uid, gid) as set in the tar file.. | `false` | No

### C.82.1 Example

    <untar file="testtar.tar.gz" todir="dest">
      <fileset dir=".">
        <include name="*.tar.gz"/>
        <include name="*.tar"/>
      </fileset>
    </untar>

### C.82.2 Supported Nested Tags

- `fileset`

Prev | Up | Next
C.81 ThrowTask | Home | C.83 UnzipTask