--- Stefan Bodewig <[EMAIL PROTECTED]> wrote:

> Hi (Matt ;-),
> 
> the design decision to not return directories in
> FileSet affects the
> tasks that want to read files and directories.
> 
> If I code a generic task that just uses iterator,
> I'll never see
> directories from FileSet (or any of FileSet's
> subclasses), instead I
> have to check whether I'm dealing with a fileset
> subclass.

That is what I had been doing, yes:

  public void add(FileSet fs) {
    add((ResourceCollection)
        new /*oata.types.resources.*/BCFileSet(fs));
  }
  public void add(ResourceCollection rc) {
     //whatever
  }

> 
> Even worse, there is no way to get the included
> directories of
> 
> <union>
>   <fileset dir="A"/>
>   <fileset dir="B"/>
> </union>

Hmm... good point.  :(
> 
> What shall we do?  Return files and directories and
> let the user
> explicitly use a <type> selector would be my
> preference.
> 
I don't see that we have much choice given your
example above.  Wouldn't we have to invert the
situation and explicitly ignore directories in tasks
that have historically used only the results of
ds.getIncludedFiles() ?

-Matt

> Stefan
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 



        
                
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to