# FileSystemLocationProperty

interface FileSystemLocationProperty<T : FileSystemLocation?> : Property<T>

Represents some element of the file system. A file system element has two parts: its location and its content. A file system element's content, may be the output of a task or tasks. This property object keeps track of both the location and the task or tasks that produce the content of the element.

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

#### Since

5.6

#### Parameters

<T>

The type of location.

#### Inheritors

DirectoryProperty
RegularFileProperty

## Functions

assign
Link copied to clipboard
fun <T : FileSystemLocation> FileSystemLocationProperty<T>.assign(file: File?)

Assign file to a FileSystemLocationProperty with assign operator

fun <T : FileSystemLocation> FileSystemLocationProperty<T>.assign(provider: Provider<File>)

Assign file provided by a Provider to a FileSystemLocationProperty with assign operator

fun <T : Any> Property<T>.assign(value: T?)

Assign value: T to a property with assign operator

fun <T : Any> Property<T>.assign(value: Provider<out T>)

Assign value: Provider to a property with assign operator

convention
Link copied to clipboard
abstract fun convention(@Nullable value: @Nullable T): Property<T>
Specifies the value to use as the convention (default value) for this property.
abstract fun convention(provider: Provider<out T>): Property<T>
Specifies the provider to be used to query the convention (default value) for this property.
disallowChanges
Link copied to clipboard
abstract fun disallowChanges()
Disallows further direct changes to this object.
disallowUnsafeRead
Link copied to clipboard
abstract fun disallowUnsafeRead()
Disallows reading the value of this object when its value may not yet be available or may still change.
fileProvider
Link copied to clipboard
abstract fun fileProvider(provider: Provider<File>): FileSystemLocationProperty<T>
Sets the location of this file, using a File Provider instance.
fileValue
Link copied to clipboard
abstract fun fileValue(@Nullable file: @Nullable File): FileSystemLocationProperty<T>
Sets the location of this file, using a File instance.
filter
Link copied to clipboard
@Incubating
abstract fun filter(spec: Spec<in T>): Provider<T>
Returns a new Provider with the value of this provider if the passed spec is satisfied and no value otherwise.
finalizeValue
Link copied to clipboard
abstract fun finalizeValue()
Disallows further changes to the value of this property.
finalizeValueOnRead
Link copied to clipboard
abstract fun finalizeValueOnRead()
Requests that the final value of this object be calculated on the next read of the value, if not already known.
flatMap
Link copied to clipboard
abstract fun <S> flatMap(transformer: Transformer<out @Nullable Provider<out S>, in T>): Provider<S>
Returns a new Provider from the value of this provider transformed using the given function.
get
Link copied to clipboard
abstract fun get(): T
Returns the value of this provider if it has a value present, otherwise throws `java.lang.IllegalStateException`.
getAsFile
Link copied to clipboard
abstract fun getAsFile(): Provider<File>
Views the location of this file as a File.
getLocationOnly
Link copied to clipboard
abstract fun getLocationOnly(): Provider<T>
Returns the location of the file system element, and discards details of the task that produces its content.
getOrElse
Link copied to clipboard
abstract fun getOrElse(defaultValue: T): T
Returns the value of this provider if it has a value present.
getOrNull
Link copied to clipboard
@Nullable
abstract fun getOrNull(): @Nullable T
Returns the value of this provider if it has a value present.
getValue
Link copied to clipboard
operator fun <T : Any> Property<T>.getValue(receiver: Any?, property: KProperty<*>): T

Property delegate for Property instances.

isPresent
Link copied to clipboard
abstract fun isPresent(): Boolean
Returns `true` if there is a value present, otherwise `false`.
map
Link copied to clipboard
abstract fun <S> map(transformer: Transformer<out @Nullable S, in T>): Provider<S>
Returns a new Provider whose value is the value of this provider transformed using the given function.
orElse
Link copied to clipboard
abstract fun orElse(value: T): Provider<T>
Returns a Provider whose value is the value of this provider, if present, otherwise the given default value.
abstract fun orElse(provider: Provider<out T>): Provider<T>
Returns a Provider whose value is the value of this provider, if present, otherwise uses the value from the given provider, if present.
set
Link copied to clipboard
abstract fun set(@Nullable file: @Nullable File)
Sets the location of this file, using a File instance.
abstract fun set(@Nullable value: @Nullable T)
Sets the value of the property to the given value, replacing whatever value the property already had.
abstract fun set(provider: Provider<out T>)
Sets the property to have the same value as the given provider, replacing whatever value the property already had.
setValue
Link copied to clipboard
operator fun <T : Any> Property<T>.setValue(receiver: Any?, property: KProperty<*>, value: T)

Property delegate for Property instances.

unset
Link copied to clipboard
abstract fun unset(): Property<T>
abstract fun unset(): SupportsConvention
Unsets this object's explicit value, allowing the convention to be selected when evaluating this object's value.
unsetConvention
Link copied to clipboard
abstract fun unsetConvention(): Property<T>
abstract fun unsetConvention(): SupportsConvention
Unsets this object's convention value.
value
Link copied to clipboard
abstract fun value(@Nullable value: @Nullable T): Property<T>
Sets the value of the property to the given value, replacing whatever value the property already had.
abstract fun value(provider: Provider<out T>): Property<T>
Sets the property to have the same value as the given provider, replacing whatever value the property already had.
zip
Link copied to clipboard
abstract fun <U, R> zip(right: Provider<U>, combiner: BiFunction<in T, in U, out @Nullable R>): Provider<R>
Returns a provider which value will be computed by combining this provider value with another provider value using the supplied combiner function.