api / org.gradle.api.file / FileCollection / getSingleFile

getSingleFile

abstract fun getSingleFile(): File

Returns the content of this collection, asserting it contains exactly one file.

Exceptions

IllegalStateException - when this collection does not contain exactly one file.

Return
The file.