有没有办法在使用 IP 地址的另一台机器上使用 watch 来更改文件?
目前我的代码是:
WatchService ws = FileSystems.getDefault().newWatchService();
Path d = FileSystem.getDefault().getPath(System.getProperty("user.dir"),"");
WatchKey wk = dir.register(ws, .... , ...);
无论如何,将 Path 变量更改为指向另一个 IP 中的文件夹。即 192.168.123.123?