Package: org.gradle.api.tasks

## [Java] Class Delete

- org.gradle.api.tasks.Delete

- Deletes files or directories. Example:

       task makePretty(type: Delete) {
         delete 'uglyFolder', 'uglyFile'
       }

- - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `protected void` | `clean()`
    `Delete` | `delete(Object... targets)` Adds some files to be deleted by this task.
    `Set<Object>` | `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(Object target)` Sets the files to be deleted by this task.

- - ### Method Detail

    - #### @TaskAction protected void clean()

    - #### public Delete delete(Object... targets)

      Adds some files to be deleted by this task. The given targets are evaluated as per Project.files.

      Parameters:
        `targets` - Any type of object accepted by Project.files

    - #### public Set<Object> getDelete()

      Returns the set of files which will be deleted by this task.

      Returns:
        The files. Never returns null.

    - #### public FileCollection getTargetFiles()

      Returns the resolved set of files which will be deleted by this task.

      Returns:
        The files. Never returns null.

    - #### public void setDelete(Object target)

      Sets the files to be deleted by this task.

      Parameters:
        `target` - Any type of object accepted by Project.files