Which Operating Systems support native (inotify-like) file watching in Java

前端 未结 2 1078
没有蜡笔的小新
没有蜡笔的小新 2021-01-06 02:31

The JavaDoc for java.nio.file.WatchService states;

The implementation ... is intended to map directly on to the native file eve

2条回答
  •  别那么骄傲
    2021-01-06 02:55

    I think that you can find some information in this post Watchservice in windows 7 does not work. There is some note about file system watchers on Windows and MacOSX (author of post says that they are using polling). On Linux file system monitoring is part of a Linux kernel and it's implemented using quite nice notifications mechanism (more info about some of them can be found here)

提交回复
热议问题