One solution would be that you nest a filterchain in your copy operation,
and that you write a custom filter which would be producing no output at
all, thus generating an empty file.
Antoine
----- Original Message -----
From: "Jacob Kjome" <hoju@visi.com>
To: <user@ant.apache.org>
Sent: Sunday, June 01, 2003 5:56 PM
Subject: how to glob copy from sample.file.txt to an empty file.txt?
>
> I currently have a glob copy that looks like this...
>
> <copy todir="${basedir}" >
> <fileset dir="${basedir}">
> <present present="srconly" targetdir="${basedir}">
> <mapper type="glob" from="sample.*" to="*" />
> </present>
> </fileset>
> <mapper type="glob" from="sample.*" to="*" />
> </copy>
>
> That copies any sample.* to * if, and only if, * does not already exist.
>
> What I'd like to do for certain files is empty the contents of the file
> when sample.* is copied to *. Basically, I want an empty * file that
> corresponds to the, full of content, sample.* file. Is there any way to
> do that? I can't seem to think of one without resorting to scripting?
>
> Jake
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
|