Skip to content

Commit 1b61857

Browse files
committed
Update README.md
1 parent 1d99274 commit 1b61857

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,11 @@ A Java file watcher that works across platforms and supports recursion, single f
1010
Features:
1111

1212
- monitor a single file (or directory) for changes
13-
- monitor a directory for changes to its direct descendants
13+
- monitor a directory for changes to its direct children
1414
- monitor a directory for changes for all its descendants (aka recursive directory watch)
15+
- backends supported:
16+
- the JDK [`WatchService`](https://docs.oracle.com/javase/8/docs/api/java/nio/file/WatchService.html) API on any platform
17+
- the native [FSEvents](https://developer.apple.com/documentation/coreservices/file_system_events) API on macOS
1518
- edge cases dealt with:
1619
- recursive watches will also continue in new directories
1720
- multiple watches for the same directory are merged to avoid overloading the kernel
@@ -61,8 +64,8 @@ try(var active = watcherSetup.start()) {
6164

6265
On all platforms except macOS, the library internally uses the JDK default implementation of the Java NIO [`WatchService`](https://docs.oracle.com/javase/8/docs/api/java/nio/file/WatchService.html) API.
6366

64-
On macOS, the library internally uses our custom `WatchService` implementation based on macOS's native [file system event streams](https://developer.apple.com/documentation/coreservices/file_system_events?language=objc) (using JNA).
65-
Generally, it offers better performance than the JDK default implementation (because the latter uses a polling loop to detect changes only once every two seconds).
67+
On macOS, the library internally uses our custom `WatchService` implementation based on macOS's native [FSEvents](https://developer.apple.com/documentation/coreservices/file_system_events) API.
68+
Generally, it offers better performance than the JDK default implementation (because the latter uses a polling loop to detect changes at fixed time intervals).
6669
To force the library to use the JDK default implementation on macOS, set system property `engineering.swat.java-watch.mac` to `jdk`.
6770

6871
## Related work

0 commit comments

Comments
 (0)