DEV Community

Discussion on: How to watch a directory in Java?

Collapse
 
moopet profile image
Ben Sinclair

I think there's an inotify library for Java. That would take care of this for you and mean you didn't have to go through the expensive "poll for events in an infinite loop" step.

Collapse
 
vijaysrj profile image
Vijay SRJ

thanks Ben..will check that.