Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.gradle.api.tasks
[Java] Class Delete

    java.lang.Object
      org.gradle.api.internal.ConventionTask
          org.gradle.api.tasks.Delete

    public class Delete
    extends ConventionTask

Deletes the specified target files or directories.

Authors:
  Hans Dockter

Method Summary
`protected void` | `clean()`
`Delete` | `delete(java.lang.Object targets)` Adds some files to be deleted by this task.
`java.util.Set` | `getDelete()` Returns the set of files which will be deleted by this task.
`FileCollection` | `getTargetFiles()` Returns the resolved set of files which will be deleted by this task.
`void` | `setDelete(java.lang.Object target)` Sets the files to be deleted by this task.

Method Detail

### clean

    @TaskAction
    protected void clean()

### delete

    public Delete delete(java.lang.Object targets)

  Adds some files to be deleted by this task.
  Parameters:
    `targets` - Any type of object accepted by Project.files

### getDelete

    public java.util.Set getDelete()

  Returns the set of files which will be deleted by this task.
  Returns:
    The files. Never returns null.

### getTargetFiles

    public FileCollection getTargetFiles()

  Returns the resolved set of files which will be deleted by this task.
  Returns:
    The files. Never returns null.

### setDelete

    public void setDelete(java.lang.Object target)

  Sets the files to be deleted by this task.
  Parameters:
    `target` - Any type of object accepted by Project.files

Groovy Documentation