# eachFile

abstract fun eachFile(action: Action<in FileCopyDetails>): CopySpec(source)

Adds an action to be applied to each file as it is about to be copied into its destination. The action can change the destination path of the file, filter the contents of the file, or exclude the file from the result entirely. Actions are executed in the order added, and are inherited from the parent spec.

abstract fun eachFile(@DelegatesTo(value = FileCopyDetails::class) closure: Closure): CopySpec(source)

Adds an action to be applied to each file as it about to be copied into its destination. The given closure is called with a as its parameter. Actions are executed in the order added, and are inherited from the parent spec.