camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: How can I get name of all subdirectoies in specific directory?
Date Sun, 10 Aug 2014 06:20:53 GMT
Hi

If you refer to the Camel file component then its for *files*.

If you want to know all directories in a directory, then use java
code. You can use java.io.File api for that, to get all the dirs.


On Sat, Aug 9, 2014 at 1:17 PM, z84 <z84@inbox.ru> wrote:
> This code get only files, but I need folders to
>
> public void process(Exchange exchange) throws Exception {
>
>      File file = exchange.getIn().getBody(File.class);
>      if (file.isDirectory()) {
>      System.out.println( "!DIR");
>      }
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/How-can-I-get-name-of-all-subdirectoies-in-specific-directory-tp5754980.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@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/

Mime
View raw message