protected void scanDirectory(){
  if (System.currentTimeMillis() - scanIntervalMillis >= lastScanMillis) {
    Set<Path> newPaths=scanner.scan(fs,filePath,processedFiles);
    for (    Path newPath : newPaths) {
      String newPathString=newPath.toString();
      pendingFiles.add(newPathString);
      processedFiles.add(newPathString);
      localProcessedFileCount.increment();
    }
    lastScanMillis=System.currentTimeMillis();
  }
}

protected void scanDirectory ( ) { if ( System . currentTimeMillis ( ) - scanIntervalMillis >= lastScanMillis ) { Set < Path > newPaths = scanner . scan ( fs , filePath , processedFiles ) ; for ( Path newPath : newPaths ) { String newPathString = newPath . toString ( ) ; pendingFiles . add ( newPathString ) ; processedFiles . add ( newPathString ) ; localProcessedFileCount . increment ( ) ; } lastScanMillis = System . currentTimeMillis ( ) ; } }
scans the directory for new files .
