ContainsInFileSet condition

Checks whether a file is in the given file sets.

Parameters

Attribute Description Required
file The file to check for inclusion in the file sets. Yes

Nested elements

FileSet
Specifies a file set to be checked against for file inclusion.

Examples

The following example checks whether ${source.dir}/doc/README.txt is in the set of files in ${source.dir}/doc and sets the hasFile property if the condition is true.
<condition property="hasFile">
    <containsInFileSet file="${source.dir}/doc/README.txt">
        <fileset dir="${source.dir}/doc" />
    </containsInFileSet>
</condition>