FileSystemLocationProperty (Gradle API 7.6.3)

Package org.gradle.api.file

## Interface FileSystemLocationProperty<T extends FileSystemLocation>

- Type Parameters:
    `T` - The type of location.
  All Superinterfaces:
    `HasConfigurableValue`, `Property<T>`, `Provider<T>`
  All Known Subinterfaces:
    `DirectoryProperty`, `RegularFileProperty`

      public interface FileSystemLocationProperty<T extends FileSystemLocation>
      extends 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

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `FileSystemLocationProperty<T>` | `fileProvider​(Provider<java.io.File> provider)` | Sets the location of this file, using a `File` `Provider` instance.
    `FileSystemLocationProperty<T>` | `fileValue​(java.io.File file)` | Sets the location of this file, using a `File` instance.
    `Provider<java.io.File>` | `getAsFile()` | Views the location of this file as a `File`.
    `Provider<T>` | `getLocationOnly()` | Returns the location of the file system element, and discards details of the task that produces its content.
    `void` | `set​(java.io.File file)` | Sets the location of this file, using a `File` instance.

    - ### Methods inherited from interface org.gradle.api.provider.HasConfigurableValue

      `disallowChanges, disallowUnsafeRead, finalizeValueOnRead`

    - ### Methods inherited from interface org.gradle.api.provider.Property

      `convention, convention, finalizeValue, set, set, value, value`

    - ### Methods inherited from interface org.gradle.api.provider.Provider

      `flatMap, forUseAtConfigurationTime, get, getOrElse, getOrNull, isPresent, map, orElse, orElse, zip`

- - ### Method Detail

    - #### getAsFile

          Provider<java.io.File> getAsFile()

      Views the location of this file as a `File`.

    - #### set

          void set​(@Nullable
                   java.io.File file)

      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

          FileSystemLocationProperty<T> fileValue​(@Nullable
                                                  java.io.File file)

      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.0

    - #### fileProvider

          FileSystemLocationProperty<T> fileProvider​(Provider<java.io.File> provider)

      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.0

    - #### getLocationOnly

          Provider<T> getLocationOnly()

      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