# classes/phing/tasks/system/AppendTask.php

## \AppendTask
jump to top

Appends text, contents of a file or set of files defined by a filelist to a destination file.

`` OR `` OR ``

Extends from
  \Task
author
  Andreas Aderhold
copyright
  2001,2002 THYRELL. All rights reserved
package
  phing.tasks.system
version
  $Revision: 526 $

### Properties

`$file= ''`

Explicit file to append.

Details

Type

`$filelists= 'array'`

Any filelists of files that should be appended.

Default value `array` Details

Type

`$filesets= 'array'`

Any filesets of files that should be appended.

Default value `array` Details

Type

`$filterChains= 'array'`

Any filters to be applied before append happens.

Default value `array` Details

Type

`$text= ''`

Text to append. (cannot be used in conjunction w/ files or filesets)

Details

Type

`$to= ''`

Append stuff to this file.

Details

Type

### Methods

`addText( string $txt ) :`
Sets text to append. Supports CDATA.
Parameters

Name | Type | Description
--- | --- | ---
$txt | string |

`appendFile( $writer, $f ) :`
Parameters

Name | Type | Description
--- | --- | ---
$writer |  |
$f |  |

`appendFiles( \FileWriter $writer, array $files, \PhingFile $dir ) :`
Append an array of files in a directory.
Parameters

Name | Type | Description
--- | --- | ---
$writer | \FileWriter | The FileWriter that is appending to target file.
$files | array | array of files to delete; can be of zero length
$dir | \PhingFile | directory to work from

`createFileList( ) : \FileList`
Supports embedded element.
Returns

Type | Description
--- | ---
\FileList |

`createFileSet( ) : \FileSet`
Nested creator, adds a set of files (nested attribute).

This is for when you don't care what order files get appended.

Returns

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

`createFilterChain( ) : \FilterChain`
Creates a filterchain
Returns

Type | Description
--- | ---
\FilterChain |

`main( ) :`
Append the file(s).
`setDestFile( \PhingFile $f ) :`
The more conventional naming for method to set destination file.
Parameters

Name | Type | Description
--- | --- | ---
$f | \PhingFile |

`setFile( $f ) :`
Sets specific file to append.
Parameters

Name | Type | Description
--- | --- | ---
$f |  |

`setText( string $txt ) :`
Sets text to append. (cannot be used in conjunction w/ files or filesets).
Parameters

Name | Type | Description
--- | --- | ---
$txt | string |

`setTo( $f ) :`
Set target file to append to.
Parameters

Name | Type | Description
--- | --- | ---
$f |  |

Details

deprecated
  Will be removed with final release.

Documentation was generated by DocBlox 0.13.1.