ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Christmann" <p...@priorartisans.com>
Subject Files exist?
Date Mon, 06 Jan 2003 18:12:22 GMT
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:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message