Equivalent for ants 'dirSet'

Is there an pure gradle equivalent for ants ‘dirSet’ ? Like

def path = ant.path {
  dirset(dir: './', includes: '*/modules/common/src/main/hadoop')




See http://www.gradle.org/docs/current/userguide/working_with_files.html#sec:file_trees

Hmm i already tried that… but

ant.path {
        dirset(dir: datameerProjectRoot, includes: 'modules/common/src/main/hadoop')
    }.list().each {
     println "_1__$it"

is yielding other results as

fileTree(datameerProjectRoot).include('modules/common/src/main/hadoop').each {
     println "_2__$it"

is doing !? Seems like it filters all directories…

If you use the visit method you can collect the dirs.

Yes, but then i would have to apply custom matcher logic right, since it gives me also the parent files of the matched dirs… correct ?