ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Lévy-Lambert <anto...@antbuild.com>
Subject AW: Check whether a fileset exist
Date Thu, 25 Sep 2003 19:40:15 GMT
I guess you mean you want to check whether a fileset contains at least one
file. You can do this by using <pathconvert/> to transform create a property
containing the files present in your fileset. Then you can use the
<condition/> task to compare the property obtained with the empty string.
Look at the condition task docu in the manual.

<project name="pathconvert">
<fileset dir="c:/dev/asf/ant" id="myfileset">
<include name="**/*.xyz"/>
</fileset>
<pathconvert refid="myfileset" targetos="unix" property="my.fileset"/>
<echo message="my.fileset is ${my.fileset}"/>
</project>

Cheers,

Antoine

-----Urspr√ľngliche Nachricht-----
Von: Oliver Wulff [mailto:oliver.wulff@zurich.ch]
Gesendet: Donnerstag, 25. September 2003 21:04
An: ant-user@jakarta.apache.org
Betreff: Check whether a fileset exist

Hi

Can I check whether a fileset exist?

Oliver



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message