Watching files in Java with WatchService
Java 7 introduced a useful API for watching files on the file system. This feature comes in handy if you need to scan a directory for new files or modified files. The API is event driven, so the system will notify you of certain events such as "new file", "modified file" or "deleted file". The example below demonstrates the key [...]