Some tasks use directory trees for the actions they perform. For example, the javac task, which compiles a directory tree with .java files into .class files, is one of these directory-based tasks. Because some of these tasks do so much work with a directory tree, the task itself can act as an implicit FileSet.
Whether the fileset is implicit or not, it can often be very useful to work on a subset of the directory tree. This section describes how you can select a subset of such a directory tree when using one of these directory-based tasks.
Ant gives you two ways to create a subset of files in a fileset, both of which can be used at the same time: