title: Scan directories in groovy with ant builder file scanner
body: <p>I want to use fileScanner of AntBuilder to go over directories.</p>
  
  <p>My code looks like:</p>
  
  <pre><code>scanner = new AntBuilder().fileScanner {
      fileset(dir:sourcedir, casesensitive:false) {
          include(name:pattern)
          type(type:'dir')
      }
  }
  </code></pre>
  
  <p>I want to loop with the scanner just on directories, for example:</p>
  
  <pre><code>for (file in scanner) {
      assert file.directory == true
  }
  </code></pre>
  
  <p>Any idea ?
  Thanks!!!!!!!!</p>