Thx Claus.
In the i/p file directory structure data/report/infolder ,it has several zip
files underneath it. Say when one of the zip file gets modified, the
infolder directory timestamp also accordingly gets modified.
So lets say there are 5 zip files in the infolder which was modified 1hr or
more and 1 zip file in the infolder which is modified within the 1 hr. What
I am expecting is a list of the 5 zip files. But based on my below
implementation I don't get any files since the infolder's timestamp has
undergone change within the 1 hr and is getting excluded out completely.
Could you please advice on how to solve it, Below is my file component
consumer implemenation and its associated filter
from("file:data/report?noop=true&recursive=true&delay=3600000&filter=MyFileFilter")
......
......
Below is my MyFileFilter
public class MyFileFilter<T> implements GenericFileFilter<T>
{
public boolean accept (GenericFile<T> file)
{
long lModified=file.getLastModified();
long onehourBefoTime= (System.currentTimeMillis()-3600*1000);
if (onehourBefoTime-lModified>=0) return true;
return false;
}
}
Thanks
--
View this message in context:
http://camel.465427.n5.nabble.com/File-component-consumer-to-consume-files-by-timestamp-based-tp5740319p5740622.html
Sent from the Camel - Users mailing list archive at Nabble.com.