FileSystemLocationProperty (Gradle API 8.14) (original) (raw)
Type Parameters:
T
- The type of location.
All Superinterfaces:
[HasConfigurableValue](../provider/HasConfigurableValue.html "interface in org.gradle.api.provider")
, [Property](../provider/Property.html "interface in org.gradle.api.provider")<T>
, [Provider](../provider/Provider.html "interface in org.gradle.api.provider")<T>
, [SupportsConvention](../provider/SupportsConvention.html "interface in org.gradle.api.provider")
All Known Subinterfaces:
[DirectoryProperty](DirectoryProperty.html "interface in org.gradle.api.file")
, [RegularFileProperty](RegularFileProperty.html "interface in org.gradle.api.file")
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
Method Summary
Sets the location of this file, using a File Provider instance.
Sets the location of this file, using a File instance.[getAsFile](#getAsFile%28%29)()
Views the location of this file as a File.
Returns the location of the file system element, and discards details of the task that produces its content.void
Sets the location of this file, using a File instance.
Methods inherited from interface org.gradle.api.provider.Provider
[filter](../provider/Provider.html#filter%28org.gradle.api.specs.Spec%29), [flatMap](../provider/Provider.html#flatMap%28org.gradle.api.Transformer%29), [forUseAtConfigurationTime](../provider/Provider.html#forUseAtConfigurationTime%28%29), [get](../provider/Provider.html#get%28%29), [getOrElse](../provider/Provider.html#getOrElse%28T%29), [getOrNull](../provider/Provider.html#getOrNull%28%29), [isPresent](../provider/Provider.html#isPresent%28%29), [map](../provider/Provider.html#map%28org.gradle.api.Transformer%29), [orElse](../provider/Provider.html#orElse%28org.gradle.api.provider.Provider%29), [orElse](../provider/Provider.html#orElse%28T%29), [zip](../provider/Provider.html#zip%28org.gradle.api.provider.Provider,java.util.function.BiFunction%29)
Method Details
getAsFile
Views the location of this file as a File.
set
Sets the location of this file, using a File instance. File instances with relative paths are resolved relative to the project directory of the project that owns this property instance.
fileValue
Sets the location of this file, using a File instance. File instances with relative paths are resolved relative to the project directory of the project that owns this property instance.
This method is the same as set(File) but allows method chaining.
Returns:
this
Since:
6.0fileProvider
Sets the location of this file, using a File Provider instance. File instances with relative paths are resolved relative to the project directory of the project that owns this property instance.
Returns:
this
Since:
6.0getLocationOnly
Returns the location of the file system element, and discards details of the task that produces its content. This allows the location, or a value derived from it, to be used as an input to some other task without implying any dependency on the producing task. This should only be used when the task does, in fact, not use the content of this file system element.
Since:
5.6