ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: <available> problem
Date Wed, 21 Mar 2001 10:46:29 GMT
Vincent Massol <vmassol@octo.fr> wrote:

> Sorry but my requirement is simple : I just want to know if the file
> exist.  How can I do that in Ant ? If available is not the right
> task, is there any other task that will do that ? I don't care
> whether the basedir directory does exist or not ...

I know that, just "" _is_ the basedir, sorry.

> I prefer Steve's idea of having 2 attributes to the available task :
> 'file' and 'dir'. File means testing if the file does exist and dir
> means testing if the directory exists. At least the meaning is clear
> and you add the ability to check whether a file does exist or not.

Having file and dir only makes sense if we not only test the existance
of a filesystem object, but also whether it is of the given type. If
we introduce this change, we are sure going to break older builds, so
it cannot happen in Ant 1.x.

And of course, <available> has the ability to check whether a
filesystem object exists - if you want this check to fail, you'll have
to specify something that does not exist.

Stefa

Mime
View raw message