ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject AW: available does not support *
Date Tue, 05 Sep 2006 05:45:34 GMT
    <property name="pattern" value="*.xml"/>

    <pathconvert property="available" setonempty="false">
        <fileset dir="." includes="${pattern}"/>

    <fail message="No files found" unless="available"/>


<available> does not support patterns, but <fileset> does. So the trick is
to use that and set a property (to some irrelevant value) if (and only if)
the fileset catched files.


>-----Urspr√ľngliche Nachricht-----
>Von: Dirk Starke [] 
>Gesendet: Dienstag, 5. September 2006 07:31
>Betreff: available does not support *
>Hello guys,
>I would like to test whether or not a specified directory 
>contains some files. 'Cause I do not really (want to) know 
>what their names are, I tried
>  <*available* file="*" ...
>but that did not work. Obviously the *available*-task does not 
>like patterns.
>Has anybody an idea how I could get this working?
>Thanks a lot in advance.
>To unsubscribe, e-mail: For 
>additional commands, e-mail:

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

View raw message