ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Juergen Hermann" ...@web.de>
Subject Re: AW: Check directory exists
Date Tue, 04 Oct 2005 17:24:02 GMT
On Tue, 4 Oct 2005 08:02:05 +0200, Frank Henry wrote:

>Just wanted to step out from lurking and add an example

><available file="${your.file.path.here}" 
property="your.file.path.here.present"/>
><echo message="your.file.path.here.present: ${your.file.path.here.present}"/>

><!-- possible results: -->
><!-- your.file.path.here.present = path does not exist (note the property 
will be undefined!) -->
><!-- true = path exists -->

><if>
>  <equals arg1="${your.file.path.here.present}" arg2="true"/>

2 comments: 1) you could use <available> directly in the if, and 2) you should 
use <istrue> instead of <equals>

Ciao, J├╝rgen



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


Mime
View raw message