code

Java WatchService tutorial

The Watch Service was introduced in Java 7 as a “thread-safe” service responsible for watching objects for changes.
The most popular use of this API would be to use it as way to monitor a folder of files for changes such as: addition of new files, deletion of files, file renames, etc.

Read more here.

Leave a Reply

Your email address will not be published. Required fields are marked *