I have a file of files that I need to load into a property and filter
according to expressions similar to the "include" and "exclude" elements
of a patternset.
For example, assume I have a file, fof.dat, containing the following.
/export/home/myaccount/myapp/bin/pgm1
/export/home/myaccount/myapp/bin/pgm2
/export/home/myaccount/myapp/config/cfg1
/export/home/myaccount/myapp/lib/lib1.jar
/export/home/myaccount/myapp/lib/lib2.jar
/export/home/myaccount/myapp/lib/lib3.jar
I would like code something like the following.
<patternset id="bin_files">
<include name="bin/*"/>
</patternset>
<loadfile property="bin_file_list" srcFile="fof.dat">
<filterchain>
<filefilter dir="/export/home/myaccount/myapp">
<patternset refid="bin_files"/>
</filefilter>
</filterchain>
</loadfile>
After the loadfile task, the bin_file_list property would contain the
following.
/export/home/myaccount/myapp/bin/pgm1
/export/home/myaccount/myapp/bin/pgm2