src/main/java/unimelb/mf/client/sync/task/FileWatchTaskProducer.java
private void registerAll(Path rootDir) throws IOException {
        // register directory and sub-directories
        Files.walkFileTree(rootDir, new SimpleFileVisitor<Path>() {
            @Override
            public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {
                register(dir);
                return FileVisitResult.CONTINUE;
            }
        });
    }
/**
     * Register the given directory, and all its sub-directories, with the
     * WatchService.
     */
Register the given directory, and all its sub-directories, with the
WatchService.
Register the given directory and all its sub - directories with the WatchService .
private void registerAll(Path rootDir) throws IOException {
        Files.walkFileTree(rootDir, new SimpleFileVisitor<Path>() {
            @Override
            public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {
                register(dir);
                return FileVisitResult.CONTINUE;
            }
        });
    }
private void registerAll ( Path rootDir ) throws IOException { Files . walkFileTree ( rootDir , new SimpleFileVisitor < Path > ( ) { @ Override public FileVisitResult preVisitDirectory ( Path dir , BasicFileAttributes attrs ) throws IOException { register ( dir ) ; return FileVisitResult . CONTINUE ; } } ) ; }
Register the given directory, and all its sub-directories, with the
 WatchService.
Register the given directory and all its sub - directories with the WatchService .
// register directory and sub-directories