next up previous contents index
Next: Patternset Up: Core Types Previous: Examples   Contents   Index

Directory-based Tasks

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:

  1. Only include files and directories that match any include patterns and do not match any exclude patterns in a given PatternSet.

  2. Select files based on selection criteria defined by a collection of selector nested elements.



Subsections

Andrew Marlow 2003-07-08