gradle
8.2

# fileContents

abstract fun fileContents(file: RegularFile): FileContents

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

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