You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Mark Fortner <ph...@yahoo.com> on 2006/02/10 22:19:06 UTC
[vfs] FileFilters Question
I've been trying to figure out how FileFilters work and unlike their
counterpart in java.io, the current implementation in VFS has me
flummoxed. According to the javadoc, you implement the FileFilter
interface by implementing an "accept" method which uses FileSelectInfo
as an argument. However, I can't seem to figure out what creates
FileSelectInfo objects. The only implementation of this class is a
private class -- DefaultFileSelectorInfo. Is there some reason that
FileSelectInfo objects are used instead of FileObjects themselves?
Regards,
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: [vfs] FileFilters Question
Posted by Mario Ivankovits <ma...@ops.co.at>.
Hi Mark!
> Mario,
> Could you post some example of how to create and use a
> filefilter, or put a code sample on the wiki?
>
Done so: http://wiki.apache.org/jakarta-commons/VfsFaq
Hope this helps.
Ciao,
Mario
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: [vfs] FileFilters Question
Posted by Mark A Fortner <ph...@yahoo.com>.
Mario,
Could you post some example of how to create and use a
filefilter, or put a code sample on the wiki?
Mark
--- Mario Ivankovits <ma...@ops.co.at> wrote:
> Hi!
> > However, I can't seem to figure out what creates
> FileSelectInfo
> > objects. The only implementation of this class is
> a private class --
> > DefaultFileSelectorInfo. Is there some reason
> that FileSelectInfo
> > objects are used instead of FileObjects
> themselves?
> The DefaultFileSelectorInfo will be created by
> AbstractFileObject.findFiles once for the whole
> traversing process.
> It is a mutable object which will be reused during
> the traverse process.
>
> Well, the idea behind this interface is to provide
> additional data - as
> you might see you can always access the base folder,
> the file and its depth.
>
> ---
> Mario
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> commons-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: [vfs] FileFilters Question
Posted by Mario Ivankovits <ma...@ops.co.at>.
Hi!
> However, I can't seem to figure out what creates FileSelectInfo
> objects. The only implementation of this class is a private class --
> DefaultFileSelectorInfo. Is there some reason that FileSelectInfo
> objects are used instead of FileObjects themselves?
The DefaultFileSelectorInfo will be created by
AbstractFileObject.findFiles once for the whole traversing process.
It is a mutable object which will be reused during the traverse process.
Well, the idea behind this interface is to provide additional data - as
you might see you can always access the base folder, the file and its depth.
---
Mario
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org