You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Paul Christmann <pa...@priorartisans.com> on 2003/01/06 19:12:22 UTC
Files exist?
Using v1.5.1:
Is there a way to set properties based on whether any files exist with
name that matches a pattern? Right now, I use a merge-mapper to copy
all files that match the given pattern and then use <available> to check
whether the file exists. But this is a) slow when there are lots of
files, and b) really really krufty.
Tho' I am embarassed to show something like this, here's what I'm doing
today:
<copy todir="${build.test.classes}">
<fileset dir="${test.src.dir}">
<include name="**/cactus/**"/>
</fileset>
<mapper type="merge" to="cactus.fileset"/>
</copy>
<available file="${build.test.classes}/cactus.fileset"
property="cactus.tests.exist"/>
Here's what I'd rather do (as an example):
<available property="cactus.tests.exist"
filePattern="**/cactus/**/>
I've gone through the manual and nothing jumped out at me.
PC
Paul Christmann
Prior Artisans
504-587-9072
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>