# classes/phing/tasks/ext/SymlinkTask.php

Generates symlinks based on a target / link combination.

Can also symlink contents of a directory, individually

Single target symlink example: ``

Symlink entire contents of directory

This will go through the contents of "/my/shared/library/*" and create a symlink for each entry into ${project.basedir}/library/ ``

author
  Andrei Serdeliuc
extends
  Task
package
  phing.tasks.ext
version
  $ID$

## \SymlinkTask
jump to top

Generates symlinks based on a target / link combination.

Can also symlink contents of a directory, individually

Single target symlink example: ``

Symlink entire contents of directory

This will go through the contents of "/my/shared/library/*" and create a symlink for each entry into ${project.basedir}/library/ ``

Extends from
  \Task
author
  Andrei Serdeliuc
copyright
  2001,2002 THYRELL. All rights reserved
extends
  Task
package
  phing.tasks.ext
version
  $ID$

### Properties

`array $_filesets= 'array'`

Collection of filesets Used when linking contents of a directory

(default value: array())

Default value `array` Details

Type
  array
access
  private

`string $_link= 'null'`

Symlink location

(default value: null)

Default value `null` Details

Type
  string
access
  private

`string $_target= 'null'`

What we're symlinking from

(default value: null)

Default value `null` Details

Type
  string
access
  private

### Methods

`createFileset( ) : \FileSet`
creator for _filesets
Returns

Type | Description
--- | ---
\FileSet |

Details

access
  public

`getFilesets( ) : array`
getter for _filesets
Returns

Type | Description
--- | ---
array |

Details

access
  public

`getLink( ) : string`
getter for _link
Returns

Type | Description
--- | ---
string |

Details

access
  public

`getMap( ) : array|string`
Generates an array of directories / files to be linked If _filesets is empty, returns getTarget()
Returns

Type | Description
--- | ---
arraystring |

Details

access
  protected

`getTarget( ) : string`
getter for _target
Returns

Type | Description
--- | ---
string |

Details

access
  public

`main( ) : bool`
Main entry point for task
Returns

Type | Description
--- | ---
bool |

Details

access
  public

`setLink( string $link ) : void`
setter for _link
Parameters

Name | Type | Description
--- | --- | ---
$link | string |

Details

access
  public

`setTarget( string $target ) : void`
setter for _target
Parameters

Name | Type | Description
--- | --- | ---
$target | string |

Details

access
  public

`symlink( string $target, string $link ) : bool`
Create the actual link
Parameters

Name | Type | Description
--- | --- | ---
$target | string |
$link | string |

Returns

Type | Description
--- | ---
bool |

Details

access
  protected

Documentation was generated by DocBlox 0.13.1.