ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gle...@ca.ibm.com
Subject Re: does and already have platform specific code? (RE: Why can't <del ete> just simply delete the directory?)
Date Fri, 08 Dec 2000 15:02:44 GMT


Personally, I'd be -1 on adding platform-specific code.  With a lot of
arguing, you _might_ get me to a -0. :-)

The reason I'm against this is maintainability.  Deltree doesn't exist in
NT4, for example (why they would have it in Win95, then remove it for NT4
astounded me, although I have to admit there is a rmdir /s command that
does the same thing); different flavours of Windows need different
commands.  We know File.delete is going to work on all platforms for all
intents and purposes.

Glenn McAllister
Software Developer. IBM Toronto Lab, (416) 448-3805
"An approximate answer to the right question is better than the
right answer to the wrong question." - John W. Tukey


Please respond to ant-user@jakarta.apache.org

To:   "Ant-User (text)" <ant-user@jakarta.apache.org>
cc:
Subject:  does and already have platform specific code? (RE: Why can't <del
      ete>          just simply delete the directory?)

Does ant already have platform-specific code?  I've looked through the code
and couldn't find a centralized and consistent way of it being done.

The reason I'm asking is that if users want a small tweak in performance,
AND there already is a structure for platform specific-ness, then I'd be
willing to try to improve the performance of the <delete> task by using the
platform specific equivalents for directories.  (e.g.: deltree on win, rm
-r
on UNIX, and defaulting to File.delete()).

Just a thought.

-----Original Message-----
From: Stefan Bodewig [mailto:bodewig@apache.org]
Sent: Friday, December 08, 2000 3:11 AM
To: ant-user@jakarta.apache.org
Subject: Re: Why can't <delete> just simply delete the directory?


Jay Glanville <dickon@nortelnetworks.com> wrote:

> The task performs beautifully, but not efficiently.  Before it
> deletes the directory, it deletes all the files within it.

File.delete will not delete a directory unless it's empty, sorry.

Stefan




Mime
View raw message