C.79 SymlinkTask
Prev | Appendix C. Optional tasks | Next

## C.79 SymlinkTask

Creates symlink(s) to a specified file / directory or a collection of files / directories.

Table C.109: Attributes

Name | Type | Description | Default | Required
--- | --- | --- | --- | ---
`target` | `String` | What you're trying to symlink from | n/a | Yes (or nested FileSet)
`link` | `String` | Where you'd like the symlink(s) | n/a | Yes
`overwrite` | `Boolean` | Whether to override the symlink if it exists but points to a different location | `false` | No

### C.79.1 Example

Single symlink

    <symlink target="/path/to/original/file" link="/where/to/symlink" />

Using filesets

    <symlink link="/where/to/symlink">
        <fileset dir="/some/directory">
            <include name="*" />
        </fileset>
    </symlink>

In the fileset example, assuming the contents of "/some/directory" were:

- Somedir

- somefile

Then the contents of "/where/to/symlink" would be:

- Somedir -> /some/directory/Somedir

- somefile -> /some/directory/somefile

### C.79.2 Supported Nested Tags

- `fileset`

Prev | Up | Next
C.78 SymfonyConsoleTask | Home | C.80 TarTask