https://github.com/vorburger/ch.vorburger.fswatch
Java lib for monitoring directories or individual files via java.nio.file.WatchService
https://github.com/vorburger/ch.vorburger.fswatch
Last synced: about 1 month ago
JSON representation
Java lib for monitoring directories or individual files via java.nio.file.WatchService
- Host: GitHub
- URL: https://github.com/vorburger/ch.vorburger.fswatch
- Owner: vorburger
- License: apache-2.0
- Created: 2018-01-28T17:12:12.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2025-10-03T22:34:27.000Z (about 1 month ago)
- Last Synced: 2025-10-04T00:23:26.556Z (about 1 month ago)
- Language: Java
- Size: 110 KB
- Stars: 31
- Watchers: 2
- Forks: 6
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
- awesome-java-zh - fswatch - 微库监视目录文件系统更改,简化了java.nio.file.WatchService。 (项目 / 实用程序)
- fucking-awesome-java - fswatch - Micro library to watch for directory file system changes, simplifying java.nio.file.WatchService. (Projects / Utility)
- awesome-java - fswatch - Micro library to watch for directory file system changes, simplifying java.nio.file.WatchService. (Projects / Utility)
- awesome-java - fswatch - Micro library to watch for directory file system changes, simplifying java.nio.file.WatchService. (Projects / Utility)
README
# ch.vorburger.fswatch
Java lib for monitoring directories or individual files based on the `java.nio.file.WatchService`.
[](https://maven-badges.herokuapp.com/maven-central/ch.vorburger/fswatch)
[](http://www.javadoc.io/doc/ch.vorburger/fswatch)
[](https://app.travis-ci.com/vorburger/ch.vorburger.fswatch)
## Usage
[Get it from Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22ch.vorburger%22%20AND%20a%3A%22fswatch%22) and see [the ExampleMain class](src/test/java/ch/vorburger/fswatch/test/ExampleMain.java) for how to use this library.
## History
This code was originally (in 2015) written for https://github.com/vorburger/HoTea,
and factored out of it in 2018 for re-use in project https://github.com/vorburger/ch.vorburger.osgi.gradle.
## Related projects
* https://github.com/google/guava/issues/2030
* [commons-io](https://commons.apache.org/proper/commons-io/) with its [File Monitor](https://commons.apache.org/proper/commons-io/javadocs/api-release/index.html?org/apache/commons/io/monitor/package-summary.html): Polling, not using Java 7+ NIO WatchService.
* https://github.com/Hindol/commons
* https://github.com/SenorArchitect/fswatcher: NOK due to https://github.com/SenorArchitect/fswatcher/issues/2 :-(
* https://github.com/azemm/FsWatcher
* https://github.com/encima/FSWatcher7
* https://www.teamdev.com/jxfilewatcher: Commercial, are they serious?!