abstract fun filter(filterClosure: Closure<Any>): FileCollection
Restricts the contents of this collection to those files which match the given criteria. The filtered collection is live, so that it reflects any changes to this collection.
The given closure is passed the File as a parameter, and should return a boolean value.
filterClosure
- The closure to use to select the contents of the filtered collection.
Return
The filtered collection.
abstract fun filter(filterSpec: Spec<in File>): FileCollection
Restricts the contents of this collection to those files which match the given criteria. The filtered collection is live, so that it reflects any changes to this collection.
filterSpec
- The criteria to use to select the contents of the filtered collection.
Return
The filtered collection.