What version of Camel do you use ?

On Tue, Oct 28, 2014 at 5:45 PM, geppo <geppore...@gmail.com> wrote:
> I'm really struggling writing the custom filter.
> I have defined my own filter which implements GenericFileFilter, but it's
> only filtering files.
> It doesn't filter directories.
>
> So for example let's say I have the following folder:
> /2014/Oct/10/somefile.txt
>
> I have no idea how to ignore the folder "Oct", because Camel goes all the
> way down to the file level.
>
> So the code below will only print "/2014/Oct/10/somefile.txt".
>
> public class MyFileFilter<T> implements GenericFileFilter<T> {
>
>         @Override
>         public boolean accept(GenericFile<T> file) {
>                 System.out.println(file.toString());
>
>                 File actualFile = (File) file.getFile();
>                 if (actualFile.isDirectory()) {
>                     // Never gets here because the input is always a file,
> never a directory
>                 }
>         }
> }
>
> How do I filter on directories so I can prevent Camel to explore them?
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Expression-Language-and-date-now-minus-plus-N-days-tp5758210p5758238.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Reply via email to