Warning: there may be difficulties if you consume files
from a directory where other applications directly write files. Please look at the different
readLock options to see if they can help.
If you are writing files to the folder, then the best approach is to write to another folder and after the write, move the file in the drop folder.
However if you need to write files directly to the drop folder then the option
changed could better detect whether a file is currently being written/copied.
changed uses a file changed algorithm to see whether the file size or
modification changes over a period of time. The other
readLock options rely on
Java File API which is not always good at detecting file changes. You may also want to look
doneFileName option, which uses a marker file (done) to signal when a
file is done and ready to be consumed.