ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Christmann" <>
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

    <copy todir="${build.test.classes}">
      <fileset dir="${test.src.dir}">
        <include name="**/cactus/**"/>
      <mapper type="merge" to="cactus.fileset"/>

    <available file="${build.test.classes}/cactus.fileset" 

Here's what I'd rather do (as an example):

    <available property="cactus.tests.exist"

I've gone through the manual and nothing jumped out at me.

Paul Christmann
Prior Artisans

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message