api / org.gradle.api.file / CopySpec / filesNotMatching

filesNotMatching

@Incubating abstract fun filesNotMatching(pattern: String, action: Action<in FileCopyDetails>): CopySpec

Configure the org.gradle.api.file.FileCopyDetails for each file whose path does not match the specified Ant-style pattern. This is equivalent to using eachFile() and selectively applying a configuration based on the file's path.

Parameters

pattern - Ant-style pattern used to match against files' relative paths

action - action called for the FileCopyDetails of each file that does not match pattern

Return
this

@Incubating abstract fun filesNotMatching(patterns: MutableIterable<String>, action: Action<in FileCopyDetails>): CopySpec

Configure the org.gradle.api.file.FileCopyDetails for each file whose path does not match any of the specified Ant-style patterns. This is equivalent to using eachFile() and selectively applying a configuration based on the file's path.

Parameters

patterns - Ant-style patterns used to match against files' relative paths

action - action called for the FileCopyDetails of each file that does not match any pattern

Return
this