Package: org.codehaus.groovy.ant

## [Java] Class FileScanner

- org.codehaus.groovy.ant.FileScanner

-     public class FileScanner
      extends Task

  `FileScanner` is a bean which allows the iteration over a number of files from a collection of FileSet instances.

- - ### Constructor Summary

    Constructors
    Constructor and description
    `FileScanner()` Creates a scanner with no associated project.
    `FileScanner(Project project)` Creates a scanner bound to the supplied Ant project.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public void` | `addFileset(FileSet set)` Adds a set of files (nested fileset attribute).
    `` | `public void` | `clear()` Clears any file sets that have been added to this scanner
    `` | `public Iterator<File>` | `directories()` Returns an iterator over the directories matched by the configured file sets.
    `` | `public boolean` | `hasFiles()` Indicates whether any file sets have been configured.
    `` | `public Iterator<File>` | `iterator()` Returns an iterator over the files matched by the configured file sets.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Task` | `bindToOwner, clone, equals, execute, getClass, getDescription, getLocation, getOwningTarget, getProject, getRuntimeConfigurableWrapper, getTaskName, getTaskType, hashCode, init, log, log, log, log, maybeConfigure, notify, notifyAll, perform, reconfigure, setDescription, setLocation, setOwningTarget, setProject, setRuntimeConfigurableWrapper, setTaskName, setTaskType, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### public FileScanner()

      Creates a scanner with no associated project.

    - #### public FileScanner(Project project)

      Creates a scanner bound to the supplied Ant project.

      Parameters:
        `project` - the owning Ant project

  - ### Method Detail

    - #### public void addFileset(FileSet set)

      Adds a set of files (nested fileset attribute).

      Parameters:
        `set` - the file set to add

    - #### public void clear()

      Clears any file sets that have been added to this scanner

    - #### public Iterator<File> directories()

      Returns an iterator over the directories matched by the configured file sets.

      Returns:
        an iterator across matched directories

    - #### public boolean hasFiles()

      Indicates whether any file sets have been configured.

      Returns:
        `true` if at least one file set has been added

    - #### public Iterator<File> iterator()

      Returns an iterator over the files matched by the configured file sets.

      Returns:
        an iterator across matched files