public class FileFingerprint
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
FileFingerprint.FingerprintTestResult |
| Modifier and Type | Field and Description |
|---|---|
static long |
NEVER_MODIFIED
Sentinel value for
time indicating a nonexistent fingerprint. |
static long |
UNKNOWN
Sentinel value for
time indicating that the timestamp was not recorded as part of the fingerprint. |
| Constructor and Description |
|---|
FileFingerprint(long time,
long size,
long hash) |
| Modifier and Type | Method and Description |
|---|---|
static FileFingerprint |
create(IPath path,
IProgressMonitor monitor) |
boolean |
equals(java.lang.Object obj) |
boolean |
fileExists()
Returns true iff the file existed at the time the fingerprint was computed.
|
static FileFingerprint |
getEmpty() |
long |
getHash() |
long |
getSize() |
long |
getTime() |
int |
hashCode() |
FileFingerprint.FingerprintTestResult |
test(IPath path,
IProgressMonitor monitor)
Compares the given File with the receiver.
|
java.lang.String |
toString() |
public static final long NEVER_MODIFIED
time indicating a nonexistent fingerprint. This is used for the timestamp of
nonexistent files and for the getEmpty() singleton.public static final long UNKNOWN
time indicating that the timestamp was not recorded as part of the fingerprint.
This is normally used to indicate that the file's timestamp was so close to the current system time at the time
the fingerprint was computed that subsequent changes in the file might not be detected. In such cases, timestamps
are an unreliable method for determining if the file has changed and so are not included as part of the fingerprint.public static final FileFingerprint getEmpty()
public static final FileFingerprint create(IPath path, IProgressMonitor monitor) throws CoreException
CoreExceptionpublic long getTime()
public long getHash()
public long getSize()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic boolean fileExists()
public FileFingerprint.FingerprintTestResult test(IPath path, IProgressMonitor monitor) throws CoreException
CoreExceptionpublic java.lang.String toString()
toString in class java.lang.Object