I want to do some specific operation after a particular file is created in the directory. so I am using apache.commons.vfs api to monitor the directory.
first time it is working fine. After create the ("XXXXXXXXX") in the directory, fileCreated method had been invoked. List of operation is executed properly after that the file also get deleted from the directory.
But in the second time if the file ("XXXXXXXXX") is created in the directory then, fileCreated method is called twice? It is happened for the remaining all execution. Any idea why it is happening like this?
It would be good if any one provide the solution for this problem. Thanks in advance.
Got the same issue. When I add twice a file with the same name, the fileCreated method is launch twice.
For instance, my process is:
- I add a first file.
- The file is processed thru the fileCreated method then removed.
- I add a second file with the same name.
- The fileCreated method is called twice...
- Every time I add a file which name was previously used, fileCreated is called twice...
I will investigate on it and post a reply if I found the cause, but if someone already encountered this, please feel free to reply.
subject: Facing a problem during monitor the files using org.apache.commons.vfs api