Path root = Paths.get(path);
WatchService watcher = root.getFileSystem().newWatchService();
register(root, watcher, StandardWatchEventKinds.ENTRY_CREATE, StandardWatchEventKinds.ENTRY_DELETE);
while (true) {
final WatchKey key = watcher.take();
for (WatchEvent<?> event : key.pollEvents()) {
@SuppressWarnings("unchecked")
Path item = ((WatchEvent<Path>) event).context();
Path dir = keys.get(key);
File file = new File(dir.toString(), item.toString()).getAbsoluteFile();