# SyncSpec

interface SyncSpec : CopySpec(source)

Synchronizes the contents of a destination directory with some source directories and files.

#### Since

7.5

## Functions

dirPermissions
Link copied to clipboard
abstract fun dirPermissions(configureAction: Action<in ConfigurableFilePermissions>): CopyProcessingSpec
eachFile
Link copied to clipboard
abstract fun eachFile(action: Action<in FileCopyDetails>): CopyProcessingSpec
abstract fun eachFile(action: Action<in FileCopyDetails>): CopySpec
exclude
Link copied to clipboard
abstract fun exclude(excludes: Array<String>): CopySpec
abstract fun exclude(excludes: Array<String>): PatternFilterable
expand
Link copied to clipboard
abstract fun expand(properties: Map<String, out Any>): ContentFilterable
abstract fun expand(properties: Map<String, out Any>): CopySpec
expand
Link copied to clipboard
inline fun ContentFilterable. expand(vararg properties: Pair<String, Any?>): ContentFilterable
inline fun ContentFilterable. expand(vararg properties: Pair<String, Any?>, action: Action<in ExpandDetails>): ContentFilterable

Kotlin extension function for org.gradle.api.file.ContentFilterable.expand.

inline fun CopySpec. expand(vararg properties: Pair<String, Any?>): CopySpec
inline fun CopySpec. expand(vararg properties: Pair<String, Any?>, action: Action<in ExpandDetails>): CopySpec

Kotlin extension function for org.gradle.api.file.CopySpec.expand.

filePermissions
Link copied to clipboard
abstract fun filePermissions(configureAction: Action<in ConfigurableFilePermissions>): CopyProcessingSpec
filesMatching
Link copied to clipboard
abstract fun filesMatching(pattern: String, action: Action<in FileCopyDetails>): CopySpec
filesNotMatching
Link copied to clipboard
abstract fun filesNotMatching(pattern: String, action: Action<in FileCopyDetails>): CopySpec
filter
Link copied to clipboard
abstract fun filter(properties: Map<String, out Any>, filterType: Class<out FilterReader>): ContentFilterable
abstract fun filter(properties: Map<String, out Any>, filterType: Class<out FilterReader>): CopySpec
filter
Link copied to clipboard
inline fun <T : FilterReader> ContentFilterable. filter(vararg properties: Pair<String, Any?>): ContentFilterable
inline fun <T : FilterReader> ContentFilterable. filter(properties: Map<String, Any?>): ContentFilterable
fun <T : FilterReader> ContentFilterable. filter(filterType: KClass<T>, vararg properties: Pair<String, Any?>): ContentFilterable
fun <T : FilterReader> ContentFilterable. filter(filterType: KClass<T>, properties: Map<String, Any?>): ContentFilterable

Adds a content filter to be used during the copy. Multiple calls add additional filters to the filter chain. Each filter should implement FilterReader. Import `org.apache.tools.ant.filters.*` for access to all the standard Ant filters.

inline fun ContentFilterable. filter(filterType: KClass<out FilterReader>): ContentFilterable
inline fun ContentFilterable. filter(filterType: KClass<out FilterReader>, vararg properties: Pair<String, Any?>): ContentFilterable

Kotlin extension function taking kotlin.reflect.KClass for org.gradle.api.file.ContentFilterable.filter.

inline fun <T : FilterReader> CopySpec. filter(vararg properties: Pair<String, Any?>): CopySpec
inline fun <T : FilterReader> CopySpec. filter(properties: Map<String, Any?>): CopySpec

Adds a content filter to be used during the copy.

inline fun CopySpec. filter(filterType: KClass<out FilterReader>): CopySpec
inline fun CopySpec. filter(filterType: KClass<out FilterReader>, vararg properties: Pair<String, Any?>): CopySpec

Kotlin extension function taking kotlin.reflect.KClass for org.gradle.api.file.CopySpec.filter.

from
Link copied to clipboard
abstract fun from(sourcePaths: Array<Any>): CopySourceSpec
abstract fun from(sourcePaths: Array<Any>): CopySpec
getDirMode
Link copied to clipboard
abstract fun getDirMode(): Integer
getDirPermissions
Link copied to clipboard
abstract fun getDirPermissions(): Property<ConfigurableFilePermissions>
getDuplicatesStrategy
Link copied to clipboard
abstract fun getDuplicatesStrategy(): DuplicatesStrategy
getExcludes
Link copied to clipboard
abstract fun getExcludes(): Set<String>
getFileMode
Link copied to clipboard
abstract fun getFileMode(): Integer
getFilePermissions
Link copied to clipboard
abstract fun getFilePermissions(): Property<ConfigurableFilePermissions>
getFilteringCharset
Link copied to clipboard
abstract fun getFilteringCharset(): String
getIncludeEmptyDirs
Link copied to clipboard
abstract fun getIncludeEmptyDirs(): Boolean
getIncludes
Link copied to clipboard
abstract fun getIncludes(): Set<String>
getPreserve
Link copied to clipboard
@Internal
abstract fun getPreserve(): PatternFilterable
Returns the filter that defines which files to preserve in the destination directory.
include
Link copied to clipboard
abstract fun include(includes: Array<String>): CopySpec
abstract fun include(includes: Array<String>): PatternFilterable
into
Link copied to clipboard
abstract fun into(destPath: Any): CopyProcessingSpec
abstract fun into(destPath: Any): CopySpec
isCaseSensitive
Link copied to clipboard
abstract fun isCaseSensitive(): Boolean
preserve
Link copied to clipboard
abstract fun preserve(action: Action<in PatternFilterable>): SyncSpec
Configures the filter that defines which files to preserve in the destination directory.
rename
Link copied to clipboard
abstract fun rename(closure: Closure): CopySpec
abstract fun rename(sourceRegEx: Pattern, replaceWith: String): CopyProcessingSpec
setCaseSensitive
Link copied to clipboard
abstract fun setCaseSensitive(caseSensitive: Boolean)
setDirMode
Link copied to clipboard
abstract fun setDirMode(mode: Integer): CopyProcessingSpec
setDuplicatesStrategy
Link copied to clipboard
abstract fun setDuplicatesStrategy(strategy: DuplicatesStrategy)
setExcludes
Link copied to clipboard
abstract fun setExcludes(excludes: Iterable<String>): CopySpec
abstract fun setExcludes(excludes: Iterable<String>): PatternFilterable
setFileMode
Link copied to clipboard
abstract fun setFileMode(mode: Integer): CopyProcessingSpec
setFilteringCharset
Link copied to clipboard
abstract fun setFilteringCharset(charset: String)
setIncludeEmptyDirs
Link copied to clipboard
abstract fun setIncludeEmptyDirs(includeEmptyDirs: Boolean)
setIncludes
Link copied to clipboard
abstract fun setIncludes(includes: Iterable<String>): CopySpec
abstract fun setIncludes(includes: Iterable<String>): PatternFilterable
with
Link copied to clipboard
abstract fun with(sourceSpecs: Array<CopySpec>): CopySpec