question: 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 ( ) ; } }
target:  Scans the directory for new files.