You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Euan Guttridge <EG...@buildonline.com> on 2003/12/30 11:08:58 UTC

recursive 'available' task

I am looking for a method to test for the existence of 'any' file under a
directory structure. I will not know where or what this file will be in the
structure so I will need to use wildcards. Searching the archives I saw an
email saying that the 'available' task cannot use wildcards, but there is
demand for this feature. Any updates on this, or any alternative solution?

Thanks
Euan


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


Re: recursive 'available' task

Posted by Daniel Blaukopf <bl...@netbeans.org>.
Hi Euan, you could try the following:

        <pathconvert property="dirContainsFiles" setonempty="false" 
targetos="unix"> <!--it doesn't matter what targetos is-->
            <path>
                <fileset dir="${dir}"/>
            </path>
        </pathconvert>

The trouble is, it can take a long time because if there ARE any files 
in ${dir} then it will return all of them. Maybe someone on the list has 
a way of making this more efficient.

Daniel

Euan Guttridge wrote:

>I am looking for a method to test for the existence of 'any' file under a
>directory structure. I will not know where or what this file will be in the
>structure so I will need to use wildcards. Searching the archives I saw an
>email saying that the 'available' task cannot use wildcards, but there is
>demand for this feature. Any updates on this, or any alternative solution?
>
>Thanks
>Euan
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
>  
>


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