camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dealbitte <>
Subject Consuming and updating directory using camel endpoint
Date Tue, 03 Jul 2012 15:51:40 GMT

I have the following requirement and I would like to know if it is possible
to implement it with Camel. 

Requirement: There exists a directory 'Drop-box' where users can drop
directories in this 'Drop-box'. It should be possible to detect such
directories (not files) dropped in the 'Drop-box' and generate a file (say
using processor) and pack the detected directory and the generated file into
a new directory and move it to 'Output' directory. 

Let's say directory 'A' has 3 files (f1.txt, f2.xml, f3.xsd). If a user
drops directory 'A' in the 'Drop-box' which is being monitored by the camel,
it should be possible with camel routes to detect the directory 'A' and
create a  file (say, info.xml) and then create a new directory called
'A-updated' whose contents should be directory 'A' and file 'info.xml'. At
the end of the route this 'A-updated' directory will be moved to 'Output'

As far as i know, files can be detected by camel but not directory. The
option 'recursive=true' for the File component traverses the sub-directories
and processes the files, but my requirement is to treat the whole directory
as if it is a file. 

Is there a way in camel to achieve the above flow ? Please share your

The current work around is to manually zip the directory and then dropping
it in the 'Drop-box'.


View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message