ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stephan beal <step...@einsurance.de>
Subject Re: Test if directory is empty
Date Thu, 21 Mar 2002 09:55:47 GMT
On Wednesday 20 March 2002 20:57 pm, Diane Holt wrote:
> --- Dominique Devienne <DDevienne@lgc.com> wrote:
> > Haven't tried it myself, but from the doc I would say that <pathconvert>
> > would have converted your fileset the way you wanted. FWIW, --DD
>
> Yep -- <pathconvert> will turn a fileset into a printable list. And you
> could use it, in combination with <condition>, to test for an empty
> directory -- eg:

Excellent. Thanks :)

>   <fileset dir="foodir" id="fs"/>
>
>   <target name="doit" depends="chkdir" unless="noFiles">
>     <echo message="files = ${files}"/>
>   </target>

So the 'unless' doesn't get checked until after any dependent targets are run?
(ooops. i think i have a fix to make in my build.xml.)

----- stephan
Generic Universal Computer Guy
stephan@einsurance.de - http://www.einsurance.de
Office: +49 (89)  552 92 862 Handy:  +49 (179) 211 97 67
"I ain't gen'rally given to physicality of that nature but it saves
a lot of arguing." -- Nanny Ogg

--
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