|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.felix.fileinstall.internal.Scanner
public class Scanner
A Scanner object is able to detect and report new, modified and deleted files. The scanner use an internal checksum to identify the signature of a file or directory. The checksum will change if the file or any of the directory's child is modified. In addition, if the scanner detects a change on a given file, it will wait until the checksum does not change anymore before reporting the change on this file. This allows to not report the change until a big copy if complete for example.
| Constructor Summary | |
|---|---|
Scanner(java.io.File directory)
Create a scanner for the specified directory |
|
Scanner(java.io.File directory,
java.io.FilenameFilter filter)
Create a scanner for the specified directory and file filter |
|
| Method Summary | |
|---|---|
long |
getChecksum(java.io.File file)
Retrieve the previously computed checksum for a give file. |
void |
initialize(java.util.Map checksums)
Initialize the list of known files. |
java.util.Set |
scan(boolean reportImmediately)
Report a set of new, modified or deleted files. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Scanner(java.io.File directory)
directory - the directory to scan
public Scanner(java.io.File directory,
java.io.FilenameFilter filter)
directory - the directory to scanfilter - a filter for file names| Method Detail |
|---|
public void initialize(java.util.Map checksums)
checksums - a map of checksumspublic java.util.Set scan(boolean reportImmediately)
reportImmediately - report all files immediately without waiting for the checksum to be stable
public long getChecksum(java.io.File file)
file - the file to retrieve the checksum
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||