gradle
8.5

# fileContents

abstract fun fileContents(file: RegularFile): FileContents(source)

Allows lazy access to the contents of the given file. When the file contents are read at configuration time the file is automatically considered as an input to the configuration model.

#### Return

an interface that allows lazy access to the contents of the given file.

#### Parameters

file

the file whose contents to read.

#### See also

FileContents

abstract fun fileContents(file: Provider<RegularFile>): FileContents(source)

Allows lazy access to the contents of the given file. When the file contents are read at configuration time the file is automatically considered as an input to the configuration model.

#### Return

an interface that allows lazy access to the contents of the given file.

#### Parameters

file

provider of the file whose contents to read.

#### See also

FileContents