Watch directories recursively in Java
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.travis
src
.gitattributes
.gitignore
.travis.yml
LICENSE.txt
README.md
pom.xml

README.md

Status

Sponsor Maven Central Test Coverage Build Status

ot-watch - is a library which simplifies the process of monitoring directories. It is watching dirs recursively and exposes all changes via simple Change interface.

Usage

Below you can find very simple example how to monitor specific file directory for the changes. We're going to print all files which changed.

try (Watch watch = new Native(Paths.get("/home"))) {
    for(List<Change.Simple> change : watch.changes()) {
        for(Change.Simple simple : change) {
            System.out.println(simple.filename());
        }
    }
}

For the performance reasons all spotted changes are aggregated into the list.

Build

mvn clean install -Pcoverage,qulice

Contribution

If you would like to contribute something to the project, feel free to create PR or submit a ticket where we can start discussion.

License

Apache License, Version 2.0, January 2004