G.6 Present
Prev | Appendix G. Core selectors | Next

## G.6 Present

The `<present>` tag selects files that have an equivalent file in another directory tree.

The `<present>` tag supports the use of a contained mapper element to define the location of the file to be compared against. If no `mapper` element is specified, the identity type mapper is used.

The `<present>` tag is case-sensitive.

    <fileset dir="phing-2.4.6/classes" includes="**/*.php">
      <present present="srconly" targetdir="phing-2.4.5/classes">
    </fileset>

Table G.6: Attributes for the `<present>` selector

Name | Description | Default | Required
--- | --- | --- | ---
`targetdir` | The base directory to look for the files to compare against. The precise location depends on a combination of this attribute and the `<mapper>` element, if any. | n/a | Yes
`present` | Whether we are requiring that a file is present in the src directory tree only, or in both the src and the target directory tree. Valid values are: `srconly` - select files only if they are in the src directory tree but not in the target directory tree `both` - select files only if they are present both in the src and target directory trees | both | No

Prev | Up | Next
G.5 Filename | Home | G.7 Containsregexp