Code example for WatchService

Methods: close

0
        } 
    } 
 
    public void close() throws IOException {
        if (watcher != null) {
            watcher.close();
        } 
    } 
 
    public long getLastModified() { 
        return lastModified;
    } 
 
    // Properties 
    //------------------------------------------------------------------------- 
 
 
    public void setRootPath(String rootPath) {
        Path path = new File(rootPath).getAbsoluteFile().toPath();
        setRoot(path);