Detect file system changes on Samba share with Java on Windows

Posted by GHad on Stack Overflow See other posts from Stack Overflow or by GHad
Published on 2010-03-08T08:44:57Z Indexed on 2010/03/08 8:51 UTC
Read the original article Hit count: 249

Filed under:
|
|
|
|

Hi,

for a recent project I need to detect file system changes on a mapped Samba share from java on windows: Creates, updates and removes. At the moment I am using a folder poll that maintains a list of files and their modified timestamp to look for events.

But my problem is that this folder poll only peeks into the folder at certain times (every 10 seconds for example), so an updated file can be updated twice between two polls without recognizing.

Is there any way to get events from windows inside Java whenever a file event occours on that mappep Samba share?

Thanks!

© Stack Overflow or respective owner

Related posts about java

Related posts about Windows