Skip to content

opentangerine/ot-watch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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