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");
public void process(Exchange exchange) throws Exception {
File file = exchange.getIn().getBody(File.class);
if (file.isDirectory()) {
System.out.println( "!DIR");