Hi Radomic, You may want to try the noop=true attribute that Ioannis mentioned along with a custom GenericFileFilter which keeps a mapping (e.g. Hashtable) between file names and their "last modified" date, or an MD5 hash of the file.
When scanning each file, compare the current value against the stored value, and if it differs, you can accept the file an update the entry in the Hashtable. Else, reject the file. Regards, Raúl. On 19 October 2011 08:22, Radomir Kadlec <radomir.kad...@aura.cz> wrote: > Hello, > thanks for the tip. > > But the problem is not that the files will be moved or deleted. > No, Camel leave them in the directory and this is right. > > But when I replace some *file with newer version* (the same file with newer > date and time), Camel file component does not recognize this and does > nothing. > > I debuged it and I see here only one solution: *To add the file date and > time to the key* for the idempotent repository. The key contains filename > only and this is not sufficient. > See GenericFileConsumer.isValidFile, where file.getAbsoluteFilePath() is > used to search in the repository. > > *Is it possible to change the key building in GenericFileConsumer* so, that > the key contains the file date and time too? > The best way to do this is to create a new protected function for key > building. So can any subclass overwrite the key building functionality in > its way. > > Thanks > Radomir > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Directory-synchronization-with-Camel-tp4913807p4916715.html > Sent from the Camel - Users mailing list archive at Nabble.com. >