ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From __matthewHawthorne <mhawtho...@alumni.pitt.edu>
Subject Re: Unable to delete directory
Date Tue, 15 Jul 2003 18:08:52 GMT
Another option is a flag which configures if non-delete-able files cause 
an error.

In Ant's code, if File.delete() returns false, you can call 
File.deleteOnExit(), which will do it's best to delete the file during 
JVM shutdown.  I've had some luck deleting mysterious files using this 
technique, and not so much luck while attempting to sleep and then 
delete again. 




Daniel Barclay wrote:

> Stefan Bodewig wrote:
>
>> On Tue, 15 Jul 2003, Daniel Barclay <Daniel.Barclay@fgm.com> wrote:
>>
>>> Does it just sleep and then proceed, or does it also wait for
>>> successful deletion?
>>
>>
>> Neither nor.  It tries to delete, sleeps if it fails and tries to
>> delete again.  If that second attempt fails, <delete> will fail.
>>
>> There may be a lot of legitimate reasons why you cannot delete the
>> file, trying until you succeed may never return.
>
>
> Can Ant detect when it has requested the deletion of a file within
> the directory and the file hasn't actually been deleted yet (if that's
> even the case you all are talking about)?
>
> Daniel
>
>
>
>
>
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> 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


Mime
View raw message