open class Delete : ConventionTask, DeleteSpec
Deletes files or directories. Example:
task makePretty(type: Delete) { delete 'uglyFolder', 'uglyFile' followSymlinks = true }
Be default symlinks will not be followed when deleting files. To change this behavior call Delete#setFollowSymlinks(boolean)
with true. On systems that do not support symlinks, this will have no effect.
Delete()
Deletes files or directories. Example: Be default symlinks will not be followed when deleting files. To change this behavior call Delete#setFollowSymlinks(boolean) with true. On systems that do not support symlinks, this will have no effect.
|
open fun delete(vararg targets: Any): Delete
Adds some files to be deleted by this task. The given targets are evaluated as per |
|
open fun getDelete(): MutableSet<Any>
Returns the set of files which will be deleted by this task. |
|
open fun getTargetFiles(): FileCollection
Returns the resolved set of files which will be deleted by this task. |
|
open fun isFollowSymlinks(): Boolean
Returns if symlinks should be followed when doing a delete. |
|
open fun setDelete(targets: MutableSet<Any>): Unit open fun setDelete(target: Any): Unit
Sets the files to be deleted by this task. |
|
open fun setFollowSymlinks(followSymlinks: Boolean): Unit
Set if symlinks should be followed. If the platform doesn't support symlinks, then this will have no effect. |