tasks/system/DeleteTask.php
Deletes a file or directory, or set of files defined by a fileset.
- Package
- phing.tasks.system
- Version
- $Revision: 552 $
\DeleteTask
Deletes a file or directory, or set of files defined by a fileset.
- Parent(s)
- \Task < \ProjectComponent
- Version
- $Revision: 552 $
Properties

$filelists= 'array()'
Any filelists of files that should be deleted.
array()Details- Type
- n/a
Methods

removeDir(
\PhingFile $d
)
:
voidRecursively removes a directory.
| Name | Type | Description |
|---|---|---|
| $d | \PhingFile | The directory to remove. |

removeFiles(
\PhingFile $d, array $files, array $dirs
)
:
voidremove an array of files in a directory, and a list of subdirectories which will only be deleted if 'includeEmpty' is true
| Name | Type | Description |
|---|---|---|
| $d | \PhingFile | directory to work from |
| $files | array | &$files array of files to delete; can be of zero length |
| $dirs | array | &$dirs array of directories to delete; can of zero length |

setDir(
\PhingFile $dir
)
:
voidSet the directory from which files are to be deleted.
| Name | Type | Description |
|---|---|---|
| $dir | \PhingFile |

setFailOnError(
$bool
)
:
voidthis flag means 'note errors to the output, but keep going'
| Name | Type | Description |
|---|---|---|
| $bool |

setFile(
\PhingFile $file
)
:
voidSet the name of a single file to be removed.
| Name | Type | Description |
|---|---|---|
| $file | \PhingFile |

setIncludeEmptyDirs(
$includeEmpty
)
:
voidUsed to delete empty directories.
| Name | Type | Description |
|---|---|---|
| $includeEmpty |

setQuiet(
$bool
)
:
voidIf the file does not exist, do not display a diagnostic message or modify the exit status to reflect an error.
This means that if a file or directory cannot be deleted, then no error is reported. This setting emulates the -f option to the Unix rm command. Default is false meaning things are verbose
| Name | Type | Description |
|---|---|---|
| $bool |