Class FileFingerprint
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.nd.java.FileFingerprint
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic longSentinel value fortimeindicating a nonexistent fingerprint.static longSentinel value fortimeindicating that the timestamp was not recorded as part of the fingerprint. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic FileFingerprintcreate(org.eclipse.core.runtime.IPath path, org.eclipse.core.runtime.IProgressMonitor monitor)booleanbooleanReturns true iff the file existed at the time the fingerprint was computed.static FileFingerprintgetEmpty()longgetHash()longgetSize()longgetTime()inthashCode()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 fortimeindicating 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 fortimeindicating 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
-