public class ScannerVisitor extends SimpleFileVisitor<Path> implements Callable<Long>
| Modifier and Type | Field and Description |
|---|---|
static String |
FOLLOW_SYMLINKS |
static String |
MAX_DEPTH |
| Constructor and Description |
|---|
ScannerVisitor(Path path,
BlockingQueue<Path> queue,
Options<String> options)
Instantiate a new task for scanning the given path.
|
| Modifier and Type | Method and Description |
|---|---|
Long |
call()
Recursively walks the file tree of a directory.
|
FileVisitResult |
preVisitDirectory(Path directory,
BasicFileAttributes attributes) |
FileVisitResult |
visitFile(Path file,
BasicFileAttributes attributes) |
FileVisitResult |
visitFileFailed(Path file,
IOException e) |
ScannerVisitor |
withLatch(SealableLatch latch) |
ScannerVisitor |
withMonitor(Notifiable monitor) |
postVisitDirectorypublic static final String FOLLOW_SYMLINKS
public static final String MAX_DEPTH
public ScannerVisitor(Path path, BlockingQueue<Path> queue, Options<String> options)
path - the path to scanpublic ScannerVisitor withMonitor(Notifiable monitor)
public ScannerVisitor withLatch(SealableLatch latch)
public Long call() throws Exception
public FileVisitResult preVisitDirectory(Path directory, BasicFileAttributes attributes) throws IOException
preVisitDirectory in interface FileVisitor<Path>preVisitDirectory in class SimpleFileVisitor<Path>IOExceptionpublic FileVisitResult visitFile(Path file, BasicFileAttributes attributes) throws IOException
visitFile in interface FileVisitor<Path>visitFile in class SimpleFileVisitor<Path>IOExceptionpublic FileVisitResult visitFileFailed(Path file, IOException e) throws IOException
visitFileFailed in interface FileVisitor<Path>visitFileFailed in class SimpleFileVisitor<Path>IOExceptionCopyright © 2019 The International Consortium of Investigative Journalists. All rights reserved.