api / org.gradle.kotlin.dsl / InitScriptApi / delete

delete

fun delete(vararg paths: Any): Boolean

Deletes files and directories.

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

Parameters

paths - Any type of object accepted by KotlinInitScript.file

Return
true if anything got deleted, false otherwise

fun delete(configuration: DeleteSpec.() -> Unit): WorkResult

Deletes the specified files.

Parameters

configuration - The block to use to configure the DeleteSpec.

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