ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: NOT A SOLUTION: Modifying a DirSet (or any AbstractFileSet) f rom within a <script>
Date Tue, 16 Sep 2003 08:21:37 GMT
On Mon, 15 Sep 2003, Ken Gentle <> wrote:

> Part of the problem is that AbstractFileSet creates a new
> DirectoryScanner on each call to "getDirectoryScanner"

This is so that it can pick up changes that have happened between
invocations.  Part of fileset's contract is that the files it returns
actually exist.

The silly example

<delete ...>
  <fileset id="foo" .../>
<copy ...>
  <fileset refid="foo"/>

would certainly violate that contract if the second fileset didn't
rescan the directory.  OK, it would be enough to rescan instead of
creating a new DirectoryScanner instance.

> Looking at the Ant sources, one can kind of see how things got this
> way, through adding features and behavior to DirectoryScanner.  But
> it sure makes any low-impact enhancement a real pain.

I agree.


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

View raw message