gradle
8.5

# DirectoryProperty

interface DirectoryProperty : FileSystemLocationProperty<T> (source)

Represents some configurable directory location, whose value is mutable.

You can create a DirectoryProperty using directoryProperty.

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

## 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> Property<T>.assign(value: T?)

Assign value: T to a property with assign operator

fun <T> 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: Directory): DirectoryProperty
abstract fun convention(provider: Provider<out Directory>): DirectoryProperty
dir
Link copied to clipboard
abstract fun dir(path: String): Provider<Directory>
abstract fun dir(path: Provider<out CharSequence>): Provider<Directory>
Returns a Directory whose value is the given path resolved relative to the value of this directory.
disallowChanges
Link copied to clipboard
abstract fun disallowChanges()
disallowUnsafeRead
Link copied to clipboard
abstract fun disallowUnsafeRead()
file
Link copied to clipboard
abstract fun file(path: String): Provider<RegularFile>
abstract fun file(path: Provider<out CharSequence>): Provider<RegularFile>
Returns a RegularFile whose value is the given path resolved relative to the value of this directory.
fileProvider
Link copied to clipboard
abstract fun fileProvider(provider: Provider<File>): DirectoryProperty
files
Link copied to clipboard
abstract fun files(paths: Array<Any>): FileCollection
Returns a FileCollection containing the given files, whose locations are the given paths resolved relative to this directory, as defined by files.
fileValue
Link copied to clipboard
abstract fun fileValue(@Nullable file: File): DirectoryProperty
filter
Link copied to clipboard
abstract fun filter(spec: Spec<out Any>): Provider<T>
finalizeValue
Link copied to clipboard
abstract fun finalizeValue()
finalizeValueOnRead
Link copied to clipboard
abstract fun finalizeValueOnRead()
flatMap
Link copied to clipboard
abstract fun <S> flatMap(transformer: Transformer<out @Nullable Provider<out S>, out Any>): Provider<S>
forUseAtConfigurationTime
Link copied to clipboard
abstract fun forUseAtConfigurationTime(): Provider<T>
get
Link copied to clipboard
abstract fun get(): T
getAsFile
Link copied to clipboard
abstract fun getAsFile(): Provider<File>
getAsFileTree
Link copied to clipboard
abstract fun getAsFileTree(): FileTree
Returns a FileTree that allows the files and directories contained in this directory to be queried.
getLocationOnly
Link copied to clipboard
abstract fun getLocationOnly(): Provider<T>
getOrElse
Link copied to clipboard
abstract fun getOrElse(defaultValue: T): T
getOrNull
Link copied to clipboard
abstract fun getOrNull(): T
getValue
Link copied to clipboard
operator fun <T> Property<T>.getValue(receiver: Any?, property: KProperty<*>): T

Property delegate for Property instances.

isPresent
Link copied to clipboard
abstract fun isPresent(): Boolean
map
Link copied to clipboard
abstract fun <S> map(transformer: Transformer<out @Nullable S, out Any>): Provider<S>
orElse
Link copied to clipboard
abstract fun orElse(value: T): Provider<T>
set
Link copied to clipboard
abstract fun set(file: File)
setValue
Link copied to clipboard
operator fun <T> Property<T>.setValue(receiver: Any?, property: KProperty<*>, value: T)

Property delegate for Property instances.

value
Link copied to clipboard
abstract fun value(@Nullable value: Directory): DirectoryProperty
abstract fun value(provider: Provider<out Directory>): DirectoryProperty
zip
Link copied to clipboard
abstract fun <U, R> zip(right: Provider<U>, combiner: BiFunction<out Any, out Any, out @Nullable R>): Provider<R>