ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nico Seessle" <>
Subject Re: Directory image task
Date Thu, 08 Mar 2001 09:32:12 GMT
----- Original Message -----
From: "Stefan Bodewig" <>
To: <>
Sent: Thursday, March 08, 2001 8:08 AM
Subject: Re: Directory image task

> Jose Alberto Fernandez <> wrote:
> > Guys,
> >
> > The only thing I need (I think) is having the semantics of:
> >
> >   <copy src dest/>
> >   <delete dest if="not in src" />
> >
> So, any takers for a <sync> task for Ant 1.4 - or should I add it to
> the wish list for Ant2?

I thought a little bit about this task and I think it may be possible to
solve this with the existing task (if there will be a little change). You
could use

    <apply executable="rm" dest="D:\temp\d1" parallel="false">
      <fileset dir="D:\temp\d2" includes="*"/>
      <mapper type="identity"/>

Which will find the files which are in D:\temp\d2 but not in D:\temp\d1.
Problem is that the name of the sourcefile is automatically appended and you
will get get error-messages from the operating system since they don't exist
:-) Don't know if this really is a problem? Another problem might be that it
can't execute shell-commands on Windows (and Unix??) since something like
"cmd /c del" as an executable is changed to "cmd \c del" on execution.

So if we would change the bahaviour of apply (and executeon) to only append
sourcefile's automatically if none of </srcfile> and </targetfile> is
specified it should do it's work. But that may break builds.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message