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 Wed, 17 Sep 2003 11:36:40 GMT
On Tue, 16 Sep 2003, Dominique Devienne <> wrote:

> But the real problem is more that getDirectoryScanner() doesn't
> allow to use a custom DirectoryScanner (or FileScanner) easily.

We absolutely agree.

> Furthermore, the break between getDS and setupDS is broken by the
> setFollowSymlinks() call, which should be in setupDS, but I suspect
> is not because it's an afterthought of FileScanner.

I think there are FileScanner implementations that don't know anything
about symbolic links - so yes, I think the asymmetry stems from this.

> This means one cannot rely on setDS to do everything, and since
> there's no getter on that attribute, I must also intercept it's
> setter to get its state!

CVS HEAD has a getter AbstractFileset#isFollowSymlinks - I think
Antoine added it when he faced exactly this asymmetry while working on
the FTP task.

> Specifically, the enhancement that I was able to HACK up was the
> ability to have what I call FileTransformer's applied on the set of
> files or directories normally returned by DirectoryScanner.
>     /**
>      * A filter that transform a set of relative filenames into
>      * another set which does not need to be of the same size, but
>      * must be rooted into the same basedir, and correspond to
>      * existing files on disk.  */

This contract is fine for all tasks that currently work with
FileScanners AFAICS.

> Whether it's desirable (I think so to some extend) or will be done
> is another story ;-)

I'm absolutely open to discussion on how we can make things easier
inside Ant's core.  After 1.6 is out - and without breaking backwards
compatibility too bad, of course.


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

View raw message