ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ondřej Světlík <ond...@svetlik.info>
Subject Re: test for directory existence
Date Thu, 16 Feb 2006 13:31:07 GMT
> Stefan-
> I guess Im confused
> why doesnt mkdir show 2 success messages instead of the just the first
> success message?
> Martin-
> ----- Original Message -----
> From: "Stefan Bodewig" <bodewig@apache.org>
> To: <user@ant.apache.org>
> Sent: Thursday, February 16, 2006 12:18 AM
> Subject: Re: test for directory existence
>
>
>> On Wed, 15 Feb 2006, Martin Gainty <mgainty@hotmail.com> wrote:
>>
>>> *Not sure about delete*
>>
>> it will fail if you tell it to delete something that isn't there -
>> unless you set the quite attribute to true in which case it will
>> simply do nothing.
>>
>>> but I know mkdir will fail if the folder is already in place
>>
>> No it won't.
>>
>> ,----
>> | <project>
>> |   <mkdir dir="foo"/>
>> |   <mkdir dir="foo"/>
>> | </project>
>> `----
>>
>> leads to
>>
>> ,----
>> |     [mkdir] Created dir: /tmp/foo
>> |
>> | BUILD SUCCESSFUL
>> | Total time: 1 second
>> `----
>>
>> The task doesn't even issue a warning message.
>>
>> Stefan
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>> For additional commands, e-mail: user-help@ant.apache.org
>>
>>
>

<mkdir> as well as <delete> prints a message only in case it creates or
deletes something. When there's nothing to create (the directory already
exists) or delete (there's no such directory) it prints no message. You
may try do run ant with parameter -d to see more output.

Best regards

Ondrej Svetlik

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


Mime
View raw message