ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <>
Subject RE: FileSet Scanning & Popluation
Date Fri, 31 Oct 2003 14:47:02 GMT
> From: Murray, Mike []
> That is probably my best/only option, if I really want to avoid multiple
> scans.
> From: Dominique Devienne []
> Sent: Friday, October 31, 2003 8:35 AM
> > I think what I need a "scan once" option on FileSet.
> Just subclass FileSet, and cache the result of the first returned
> directory
> scanner, which you'd return on every other class to getDirectoryScanner().
> Forces you to declare the id'd fileset outside any task, and refid it
> everywhere else, and is a bit of a hack too, but would work. --DD

Yeah, I think it's a useful addition, albeit one a little dangerous if
misused. I'd just add a new 'dynamic' attribute to the subclasses FileSet,
which always defaults to true, and forwards all calls to
getDirectoryScanner() to super.getDirectoryScanner() to keep the normal
behavior of a FileSet.

This way, it's more obvious the fileset is not dynamic when you read:

<fileset dir="..." dynamic="false"

<propertyset> also has such a 'dynamic' attribute. --DD

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

View raw message