Package org.gradle.api.file

## Interface RegularFileProperty

- All Superinterfaces:
    `FileSystemLocationProperty<RegularFile>`, `HasConfigurableValue`, `Property<RegularFile>`, `Provider<RegularFile>`

      public interface RegularFileProperty
      extends FileSystemLocationProperty<RegularFile>

  Represents some configurable regular file location, whose value is mutable.

  You can create a `RegularFileProperty` using `ObjectFactory.fileProperty()`.

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

  Since:
    4.3

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `RegularFileProperty` | `convention​(RegularFile value)` | Specifies the value to use as the convention for this property.
    `RegularFileProperty` | `convention​(Provider<? extends RegularFile> valueProvider)` | Specifies the provider of the value to use as the convention for this property.
    `RegularFileProperty` | `fileProvider​(Provider<File> provider)` | Sets the location of this file, using a `File` `Provider` instance.
    `RegularFileProperty` | `fileValue​(File file)` | Sets the location of this file, using a `File` instance.
    `RegularFileProperty` | `value​(RegularFile value)` | Sets the value of the property the given value, replacing whatever value the property already had.
    `RegularFileProperty` | `value​(Provider<? extends RegularFile> provider)` | Sets the property to have the same value of the given provider, replacing whatever value the property already had.

    - ### Methods inherited from interface org.gradle.api.file.FileSystemLocationProperty

      `getAsFile, getLocationOnly, set`

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

      `disallowChanges, disallowUnsafeRead, finalizeValueOnRead`

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

      `finalizeValue, set, set`

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

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

- - ### Method Detail

    - #### value

          RegularFileProperty value​(@Nullable
                                    RegularFile value)

      Sets the value of the property the given value, replacing whatever value the property already had.

      This is the same as `Property.set(Object)` but returns this property to allow method chaining.

      Specified by:
        `value` in interface `Property<RegularFile>`
      Parameters:
        `value` - The value, can be null.
      Returns:
        this

    - #### value

          RegularFileProperty value​(Provider<? extends RegularFile> provider)

      Sets the property to have the same value of the given provider, replacing whatever value the property already had. This property will track the value of the provider and query its value each time the value of the property is queried. When the provider has no value, this property will also have no value.

      This is the same as `Property.set(Provider)` but returns this property to allow method chaining.

      Specified by:
        `value` in interface `Property<RegularFile>`
      Parameters:
        `provider` - The provider whose value to use.
      Returns:
        this

    - #### fileValue

          RegularFileProperty fileValue​(@Nullable
                                        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 `FileSystemLocationProperty.set(File)` but allows method chaining.

      Specified by:
        `fileValue` in interface `FileSystemLocationProperty<RegularFile>`
      Returns:
        this

    - #### fileProvider

          RegularFileProperty fileProvider​(Provider<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.
      Specified by:
        `fileProvider` in interface `FileSystemLocationProperty<RegularFile>`
      Returns:
        this

    - #### convention

          RegularFileProperty convention​(RegularFile value)

      Specifies the value to use as the convention for this property. The convention is used when no value has been set for this property.
      Specified by:
        `convention` in interface `Property<RegularFile>`
      Parameters:
        `value` - The value, or `null` if the convention is that the property should have no value.
      Returns:
        this

    - #### convention

          RegularFileProperty convention​(Provider<? extends RegularFile> valueProvider)

      Specifies the provider of the value to use as the convention for this property. The convention is used when no value has been set for this property.
      Specified by:
        `convention` in interface `Property<RegularFile>`
      Parameters:
        `valueProvider` - The provider of the value.
      Returns:
        this