FileSystemLocationProperty<Directory>
, HasConfigurableValue
, Property<Directory>
, Provider<Directory>
public interface DirectoryProperty extends FileSystemLocationProperty<Directory>
You can create a DirectoryProperty
using ObjectFactory.directoryProperty()
.
Note: This interface is not intended for implementation by build script or plugin authors.
Modifier and Type | Method | Description |
---|---|---|
DirectoryProperty |
convention(Directory value) |
Specifies the value to use as the convention for this property.
|
DirectoryProperty |
convention(Provider<? extends Directory> valueProvider) |
Specifies the provider of the value to use as the convention for this property.
|
Provider<Directory> |
dir(String path) |
Returns a
Directory whose value is the given path resolved relative to the value of this directory. |
Provider<Directory> |
dir(Provider<? extends CharSequence> path) |
Returns a
Directory whose value is the given path resolved relative to the value of this directory. |
Provider<RegularFile> |
file(String path) |
Returns a
RegularFile whose value is the given path resolved relative to the value of this directory. |
Provider<RegularFile> |
file(Provider<? extends CharSequence> path) |
Returns a
RegularFile whose value is the given path resolved relative to the value of this directory. |
DirectoryProperty |
fileProvider(Provider<File> provider) |
|
FileCollection |
files(Object... paths) |
Returns a
FileCollection containing the given files,
whose locations are the given paths resolved relative to this directory,
as defined by Project.files(Object...) . |
DirectoryProperty |
fileValue(File file) |
Sets the location of this file, using a
File instance. |
FileTree |
getAsFileTree() |
Returns a
FileTree that allows the files and directories contained in this directory to be queried. |
DirectoryProperty |
value(Directory value) |
Sets the value of the property the given value, replacing whatever value the property already had.
|
DirectoryProperty |
value(Provider<? extends Directory> provider) |
Sets the property to have the same value of the given provider, replacing whatever value the property already had.
|
getAsFile, getLocationOnly, set
disallowChanges, disallowUnsafeRead, finalizeValueOnRead
finalizeValue, set, set
FileTree getAsFileTree()
FileTree
that allows the files and directories contained in this directory to be queried.DirectoryProperty value(@Nullable Directory value)
This is the same as Property.set(Object)
but returns this property to allow method chaining.
DirectoryProperty value(Provider<? extends Directory> provider)
This is the same as Property.set(Provider)
but returns this property to allow method chaining.
DirectoryProperty fileValue(@Nullable File file)
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.
fileValue
in interface FileSystemLocationProperty<Directory>
DirectoryProperty fileProvider(Provider<File> provider)
File
Provider
instance. File
instances with relative paths are resolved relative to the project directory of the project
that owns this property instance.fileProvider
in interface FileSystemLocationProperty<Directory>
DirectoryProperty convention(Directory value)
convention
in interface Property<Directory>
value
- The value, or null
if the convention is that the property should have no value.DirectoryProperty convention(Provider<? extends Directory> valueProvider)
convention
in interface Property<Directory>
valueProvider
- The provider of the value.Provider<Directory> dir(String path)
Directory
whose value is the given path resolved relative to the value of this directory.path
- The path. Can be absolute.Provider<Directory> dir(Provider<? extends CharSequence> path)
Directory
whose value is the given path resolved relative to the value of this directory.path
- The path. Can have a value that is an absolute path.Provider<RegularFile> file(String path)
RegularFile
whose value is the given path resolved relative to the value of this directory.path
- The path. Can be absolute.Provider<RegularFile> file(Provider<? extends CharSequence> path)
RegularFile
whose value is the given path resolved relative to the value of this directory.path
- The path. Can have a value that is an absolute path.@Incubating FileCollection files(Object... paths)
FileCollection
containing the given files,
whose locations are the given paths resolved relative to this directory,
as defined by Project.files(Object...)
.
This method can also be used to create an empty collection, but the collection may not be mutated later.paths
- The paths to the files. May be empty.