Reputation: 780
I am working on project which looks up a remote directory for changes. I have been able to do this for a local folder using java watchservice. But for the remote directories it fails. Is there any way in java through which I can watch a remote folder. e.g. you watch a folder in your local area network for changes.
Upvotes: 3
Views: 1955
Reputation: 870
You can use common-vfs to use same api for different filesystems. I'm not sure that it can use events for your particular FS, but it provides abstraction, that can use poll internally and give you events for changes.
Upvotes: 1
Reputation: 3968
You can use JCIFS library which supports accessing network share on Windows platform. I am not sure if it supports "listening for changes" to the remote share. There is another project JCifs Monitor which may be helpful for you.
Upvotes: 1