Class FileFingerprint
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.nd.java.FileFingerprint
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic long
Sentinel value fortime
indicating a nonexistent fingerprint.static long
Sentinel value fortime
indicating that the timestamp was not recorded as part of the fingerprint. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic FileFingerprint
create(org.eclipse.core.runtime.IPath path, org.eclipse.core.runtime.IProgressMonitor monitor)
boolean
boolean
Returns true iff the file existed at the time the fingerprint was computed.static FileFingerprint
getEmpty()
long
getHash()
long
getSize()
long
getTime()
int
hashCode()
test(org.eclipse.core.runtime.IPath path, org.eclipse.core.runtime.IProgressMonitor monitor)
Compares the given File with the receiver.toString()
-
Field Details
-
NEVER_MODIFIED
public static final long NEVER_MODIFIEDSentinel value fortime
indicating a nonexistent fingerprint. This is used for the timestamp of nonexistent files and for thegetEmpty()
singleton.- See Also:
- Constant Field Values
-
UNKNOWN
public static final long UNKNOWNSentinel value fortime
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.- See Also:
- Constant Field Values
-
-
Constructor Details
-
FileFingerprint
public FileFingerprint(long time, long size, long hash)
-
-
Method Details
-
getEmpty
-
create
public static final FileFingerprint create(org.eclipse.core.runtime.IPath path, org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException- Throws:
org.eclipse.core.runtime.CoreException
-
getTime
public long getTime() -
getHash
public long getHash() -
getSize
public long getSize() -
hashCode
public int hashCode() -
equals
-
fileExists
public boolean fileExists()Returns true iff the file existed at the time the fingerprint was computed.- Returns:
- true iff the file existed at the time the fingerprint was computed.
-
test
public FileFingerprint.FingerprintTestResult test(org.eclipse.core.runtime.IPath path, org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreExceptionCompares the given File with the receiver. If the fingerprint matches (ie: the file- Throws:
org.eclipse.core.runtime.CoreException
-
toString
-