# Appendix D: Core Selectors

Selectors are a specific subset of Phing data types that allow you to fine-tune matching in a FileSet (or DirSet).

This documentation has not yet been written; please use the Ant documentation for now, since the APIs for the Phing selectors are largely the same.

Phing supports the following selectors, which typically match on both files and directories in a <fileset>:

- <contains> - Select files that contain a specific string
- <date> - Select files/directories that have been modified either before or after a specific date/time
- <depend> - Select files/directories that have been modified more recently than equivalent items elsewhere
- <depth> - Select files/directories that appear at a specific depth in a directory tree
- <different> - Select files that are different from those elsewhere
- <filename> - Select files/directories whose name matches a particular pattern. Equivalent to the include and exclude elements of a patternset.
- <present> - Select files/directories that either do or do not exist in some other location
- <containsregexp> - Select files that contain text matching a regular expression
- <size> - Select files that are larger or smaller than a particular number of bytes.
- <type> - Select files/directories by type ('file' or 'dir')