ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: FileSet Scanning & Popluation
Date Fri, 31 Oct 2003 07:14:59 GMT
On Thu, 30 Oct 2003, Mike Murray <> wrote:

> Although a FileSet can be defined with an id for reuse, it appears
> that every time is is used it performs its scan.


> Is there any way to have it scan and populate once, and then access
> it from multiple tasks?

Reuse the DirectoryScanner instance.

> I'm focusing on its getDirectoryScanner() method.

Because of this I assume that you are talking about tasks of your
own.  In the first task, do something like

getProject().addReference("my-ds-key", fs.getDirectoryScanner());

and when you want to reuse it in the other task

DirectoryScanner ds = (DirectoryScanner) getProject().getReference("my-ds-key");

So you don't ID the fileset but the DirectoryScanner itself.

Sorry, no built-in way to do that (yet?).


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

View raw message