You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by James Duncan Davidson <du...@x180.net> on 2000/12/10 23:39:41 UTC

Re: does and already have platform specific code? (RE: Why can't just simply delete the directory?)

On 12/8/00 4:59 AM, "Jay Glanville" <di...@nortelnetworks.com> wrote:

> 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.

If you are referring to native code, no, there isn't. I'd actually like to
stay away from native code unless it's absolutely necessary to use it. Going
down that road gets very complex for all of the platforms.

Now, in AntEater, there will be a bit more seperation between tasks in
source code, so if a specific task (esp an optional task) needs to use
native code, then that's ok.

> 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()).

Are we really talking a performance tweak -- I've not noticed a delete of a
rather large directory taking much time at all. If you are noticing
differently, then it would be interesting to figure out why.

-- 
James Duncan Davidson                                        duncan@x180.net
                                                                  !try; do()