ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mariusz Nowostawski <mari...@marni.otago.ac.nz>
Subject Re: Consolidated delete task
Date Thu, 25 May 2000 22:06:52 GMT

> > Arnout has started a thread about consolidating tasks some days
> > [...]

Task consolidation (delete, deltree and others, I thought it was already
decided ;)
+1

> > Do we keep different attributes for deleting files and dirs, i.e.
> > <delete file="name" /> with no includes or excludes allowed and
> > <delete dir="name" /> with all the MatchingTask stuff in place? I
> > think we should do so to avoid accidents.
> 
> Again, makes sense.

+1

> > Should we set defaultexcludes to false by default when deleting a
> > directory tree - my opinion is yes.
> 
> Agreed.

+1

 
> > Do we need a recurse attribute (don't think so, if you specify a dir,
> > you obviously want to delete it)?
> 
> I think we might. The delete task (at least the "official" one -- I haven't
> tried building from the latest sources) doesn't accept wildcards in the file
> attribute (at least not on NT), so the only way to delete all Java class
> files in a single directory but not its subdirectories would be
> 
>     <delete dir="some/dir" recurse="false" includes="*.class" />

I think

      <delete dir="some/dir" includes="*.class" />

is obviously without recursion and

      <delete dir="some/dir" includes="**/*.class" />

is obviously with recursion. 
What this one would mean if we allow additional tag:

    <delete dir="some/dir" recurse="false" includes="**/*.class" />

?

-1 for a recursion tag, 
include/exclude mechanism is clearer, and is already there.


> > Do we need a purge attribute to delete empty dirs - I'm not decided on
> > this?
> 
> I think so, though it could be set to true by default.

+1 for setting it to true by default 
(but I do not really mind empty dirs to hang around. I want usually to
replace subtrees or files, and general tree structure is always the same,
thus empty dirs somewhere in the tree are all right to me - I do not have
to recreate them when I rebuild. Thus for:

    <delete dir="some/dir" includes="**/*.class" />

I do not really care if the empty dirs will be replaced or not that much.)


regards
Mariusz


Mime
View raw message