For AI agents: the documentation index is at https://docs.gradle.org/llms.txt. Request any page with the header Accept: text/markdown to get Markdown. User manual pages are also available as Markdown by replacing .html with .md in the URL.

contains

abstract fun contains(file: File): Boolean(source)

Determines whether this collection contains the given file. Generally, this method is more efficient than calling getFiles().contains(file).

Return

true if this collection contains the given file, false otherwise.

Since

0.9

Parameters

file

The file to check for.