Implementing renaming and deletion in java watchservice
问题 I tried to implement simple renaming in java WatchService. My assumption is: when files are renamed, three operations are performed Deletion of file xxx creation of file yyy modification of file yyy Below are my codes: MyWatcher.java import java.io.IOException; import java.nio.file.FileSystems; import java.nio.file.Path; import java.nio.file.Paths; import java.nio.file.StandardWatchEventKinds; import java.nio.file.WatchEvent; import java.nio.file.WatchKey; import java.nio.file.WatchService;