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.

FileContents

interface FileContents(source)

Provides lazy access to the contents of a given file.

Since

6.1

Functions

Link copied to clipboard
abstract fun getAsBytes(): Provider<Array<Byte>>
Gets a provider of the entire file contents as a single byte array.
Link copied to clipboard
abstract fun getAsText(): Provider<String>
Gets a provider of the entire file contents as a single String.