I want to use fileScanner of AntBuilder to go over directories.
My code looks like:
scanner = new AntBuilder().fileScanner {
fileset(dir:sourcedir, casesensitive:false) {
include(name:pattern)
type(type:'dir')
}
}
I want to loop with the scanner just on directories, for example:
for (file in scanner) {
assert file.directory == true
}
Any idea ? Thanks!!!!!!!!
Here's how to do it with
fileScanner
You could also do it with Groovy calls: