api / org.gradle.api.file / FileSystemLocation

FileSystemLocation

@Incubating interface FileSystemLocation

Represents some immutable location on the file system.

Note: This interface is not intended for implementation by build script or plugin authors.

Since
4.2

Functions

getAsFile

abstract fun getAsFile(): File

Returns this location as an absolute File.

Inheritors

Directory

interface Directory : FileSystemLocation

Represents a directory at some fixed location on the file system.

Note: This interface is not intended for implementation by build script or plugin authors. An instance of this class can be created using the #dir(String) method or using various methods on ProjectLayout such as ProjectLayout#getProjectDirectory().

RegularFile

interface RegularFile : FileSystemLocation

Represents a regular file at a fixed location on the file system. A regular file is a file that is not a directory and is not some special kind of file such as a device.

Note: This interface is not intended for implementation by build script or plugin authors. An instance of this class can be created from a Directory instance using the Directory#file(String) method or via various methods on ProjectLayout such as ProjectLayout#getProjectDirectory().