public class Scanner extends Object implements Closeable
| Constructor and Description |
|---|
Scanner(File directory)
Create a scanner for the specified directory
|
Scanner(File directory,
String filterString)
Create a scanner for the specified directory and file filter
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
long |
getChecksum(File file)
Retrieve the previously computed checksum for a give file.
|
void |
initialize(Map<File,Long> checksums)
Initialize the list of known files.
|
Set<File> |
scan(boolean reportImmediately)
Report a set of new, modified or deleted files.
|
void |
updateChecksum(File file)
Update the checksum of a file if that file is already known locally.
|
public Scanner(File directory)
directory - the directory to scanpublic void initialize(Map<File,Long> checksums)
checksums - a map of checksumspublic Set<File> scan(boolean reportImmediately)
reportImmediately - report all files immediately without waiting for the checksum to be stablepublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic long getChecksum(File file)
file - the file to retrieve the checksumpublic void updateChecksum(File file)
Copyright © 2006–2015 The Apache Software Foundation. All rights reserved.