delete

abstract fun delete(paths: Array<Any>): Boolean(source)

Deletes files and directories.

This will not follow symlinks. If you need to follow symlinks too use delete.

Return

true if anything got deleted, false otherwise

Parameters

paths

Any type of object accepted by files


abstract fun delete(action: Action<in DeleteSpec>): WorkResult(source)

Deletes the specified files. The given action is used to configure a DeleteSpec, which is then used to delete the files.

Example:

project.delete {
    delete 'somefile'
    followSymlinks = true
}

Return

WorkResult that can be used to check if delete did any work.

Parameters

action

Action to configure the DeleteSpec