ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Transforming/mapping filesets
Date Wed, 17 Oct 2001 07:48:12 GMT
On Mon, 1 Oct 2001, <ryan@mediumone.com> wrote:

> Is there a way to do this now?

I first thought you could get away with <apply> (at the cost of
portability), something like

<apply executable="rm">
  <srcfile />

  <fileset dir="." excludes="*.foo" />
  <mapper type="glob" from="*" to="*.foo" />
</apply>

could work - this will delete all files not ending with .foo where no
corresponding .foo file can be found or .foo is older than the file in
question.  As long as there are only .foo files in the directory and
nothing else (after the cleanup) this could work.  Looks a little
dangerous.

> Is this a sensible feature?

It has been asked for before and we are planning to enhance the whole
<fileset> stuff to allow to build fileset based on other predicates,
not just pattern matching (readable files, files modified before a
given date and so on) - using some kind of mapper predicate fits into
this very vague picture as well.

Stefan

Mime
View raw message