ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@apache.org>
Subject Re: [PATCH] Delete.java --> Re: delete error
Date Thu, 23 Aug 2001 00:49:16 GMT
On Thu, 23 Aug 2001 02:37, Matthew Inger wrote:
> what would be nice on the filepatterns is to be able check a certain
> condition before executing the delete on the file.  what you could
> essentially
> do is to have it exec this command, and check the return code.  If the
> return code
> is non-zero, you don't execute the delete.  I think this would give a
> huge amount
> of flexibility, while not disrupting the code too much.
>
> I would think something like this would be useful:
...snip...

What you describe is unfortunately relatively unixen specific. We have talked 
about doing this in more general terms in context of Ant2 via Cullers. 
Cullers are things who implement interface like

interface Culler
{
  boolean cull( String item );
}

And wiould XML like

<delete ....>
  <fileset ...>
    <cullers>
      <islink/>
    <cullers>
  </fileset>
</delete>

-- 
Cheers,

Pete

*-----------------------------------------------------*
* "Faced with the choice between changing one's mind, *
* and proving that there is no need to do so - almost *
* everyone gets busy on the proof."                   *
*              - John Kenneth Galbraith               *
*-----------------------------------------------------*

Mime
View raw message