camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rrajen2 <>
Subject File component consumer to consume files by timestamp based
Date Sat, 28 Sep 2013 00:40:50 GMT
 My requirements for the file component consumer is to just get list of
filenames from a directory that have last modified timestamp which is 1 hr
and greater and append the list of files to a file say data/outputlist.txt.
How would I do that? Could you plz advice? 

The pseudo code that I have so far is 
Route1://create a data/outputlist.txt containing list of files that are 1 hr
and greater in the data/report directory.
       .processor(Exchange e)
Route2: //this route actually has to email the data/outputlist.txt file
after its completely done by Route1 and delete the file.
      .... //where i email the outputlist.txt file after it is completely
done and finally delete the outputlist.txt

The MyFilter is my custom filter that I am intending to do similar to the
public class MyFileFilter<T> implements GenericFileFilter<T> {
    public boolean accept(GenericFile<T> file) {
        // we want all directories
        if (file.isDirectory()) {
            return true;
        // we dont accept any files starting with skip in the name
        return !file.getFileName().startsWith("skip");
But I don't know how in the MyFileFilter I could filter based on the

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

View raw message