public final class ArchiveEntry
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
boolean |
checksumOK()
Returns
true if this the checksum of this archive entry has been verified
successfully (or if no verification information for the checksum is available). |
java.lang.String |
describeLink()
Returns a (verbose) string description of this entry, including the (brief) verification
status, if available.
|
java.lang.String |
describeLink(boolean verbose)
Returns a string description of this entry, including the (brief) verification status, if
available.
|
java.lang.String |
describeLink(boolean verbose,
boolean numeric)
Returns a string description of this entry, including the (brief) verification status, if
available.
|
java.lang.String |
describeLink(boolean verbose,
boolean numeric,
boolean includeCheck)
Returns a string description of this entry.
|
ArchiveEntryCompleteness |
getCompleteness()
Returns how complete this entry is.
|
int |
getCrc32()
Returns the CRC32 checksum of this entry, or 0, if this information is not available or if
this entry is not a regular file.
|
java.lang.String |
getCrc32Str()
Returns a string representation (using hexadecimal digits) of the CRC32 checksum of this
entry, or "00000000", if this information is not available or if this entry is not a regular
file.
|
int |
getGid()
Returns the GID of the group owning this archive entry, or -1, if this information is not
available.
|
java.lang.String |
getGroup(boolean numeric)
Returns a string representation of the group owning this archive entry, or "?", if this
information is not available.
|
long |
getLastModified()
Returns the date and time of last modification of this entry, measured in seconds since the
epoch (00:00:00 GMT, January 1, 1970), or -1, if this information is not available.
|
java.lang.String |
getLastModifiedStr()
Returns a string representation of the date and time of last modification of this entry, or
"?", if this information is not available.
|
java.lang.String |
getLinkTarget()
Returns the link target.
|
ch.systemsx.cisd.base.unix.FileLinkType |
getLinkType()
Returns the type of this entry.
|
java.lang.String |
getName()
Returns the name of the path this entry.
|
java.lang.String |
getParentPath()
Returns the parent directory of the path of this entry.
|
java.lang.String |
getPath()
Returns the full path of this entry.
|
short |
getPermissions()
Returns the access permissions of this archive entry, or -1, if this information is not
available.
|
java.lang.String |
getPermissionsString(boolean numeric)
Returns a string representation of the access permissions of this archive entry, or "?", if
this information is not available.
|
java.lang.String |
getRealName()
Returns the name of the path this entry.
|
java.lang.String |
getRealParentPath()
Returns the real parent directory of the path of this entry.
|
java.lang.String |
getRealPath()
Returns the real full path of this entry.
|
long |
getSize()
Returns the size of this entry, if this entry is a regular file, or 0 otherwise.
|
java.lang.String |
getStatus(boolean verbose)
Returns a status string for this entry.
|
int |
getUid()
Returns the UID of the user owning this archive entry, or -1, if this information is not
available.
|
java.lang.String |
getUser(boolean numeric)
Returns a string representation of the user owning this archive entry, or "?", if this
information is not available.
|
int |
getVerifiedCrc32()
Returns the verified CRC32 checksum of this archive entry, or 0, if this information is not
available.
|
java.lang.String |
getVerifiedCrc32Str()
Returns a string representation (using hexadecimal digits) of the verified CRC32 checksum of
this entry, or "00000000", if this information is not available or if this entry is not a
regular file.
|
long |
getVerifiedLastModified()
Returns the verified date and time of last modification of this entry, measured in seconds
since the epoch (00:00:00 GMT, January 1, 1970), or -1, if this information is not available.
|
java.lang.String |
getVerifiedLastModifiedStr()
Returns a string representation of the verified date and time of last modification of this
entry, or "?", if this information is not available.
|
long |
getVerifiedSize()
Returns the verified size of this archive entry, or -1, if this information is not available.
|
boolean |
hasChecksum()
Returns
true , if this archive entry has a CRC32 checksum stored. |
boolean |
hasLinkTarget()
Returns
true , if this entry has a meaningful link target. |
boolean |
hasVerificationInfo()
Returns true, if this entry has verification information on archive integrity.
|
boolean |
isDirectory()
Returns if this entry is of type
FileLinkType.DIRECTORY . |
boolean |
isOK()
Returns
true if this archive entry has been verified successfully (or if no
verification information is available). |
boolean |
isRegularFile()
Returns if this entry is of type
FileLinkType.REGULAR_FILE . |
boolean |
isSymLink()
Returns if this entry is of type
FileLinkType.SYMLINK . |
boolean |
lastModifiedOK()
Returns
true if this the last modification date of this archive entry has been
verified successfully (or if no verification information for the last modification date is
available). |
boolean |
linkTypeOK()
Returns
true if this the type of this archive entry has been verified
successfully (or if no verification information for the type is available). |
boolean |
sizeOK()
Returns
true if this the size of this archive entry has been verified
successfully (or if no verification information for the size is available). |
java.lang.String |
toString() |
java.lang.String |
tryGetErrorLine()
Returns the error line saved for this archive entry, or
null , if no error line
is available. |
ch.systemsx.cisd.base.unix.FileLinkType |
tryGetVerifiedLinkType()
Returns the verified type of this entry, or
null , if no verification has been
performed on this entry. |
public java.lang.String getPath()
public java.lang.String getParentPath()
public java.lang.String getName()
public java.lang.String getRealPath()
This will be the same as getPath()
, except when it originates from a call to
IHDF5ArchiveInfoProvider.tryGetResolvedEntry(String, boolean)
with
keepPath=true
where it will be the path of the link target.
public java.lang.String getRealParentPath()
This will be the same as getPath()
, except when it originates from a call to
IHDF5ArchiveInfoProvider.tryGetResolvedEntry(String, boolean)
with
keepPath=true
where it will be the parent path of the link target.
public java.lang.String getRealName()
This will be the same as getPath()
, except when it originates from a call to
IHDF5ArchiveInfoProvider.tryGetResolvedEntry(String, boolean)
with
keepPath=true
where it will be the name of the link target.
public ArchiveEntryCompleteness getCompleteness()
ArchiveEntryCompleteness.BASE
entries can occur if the archive does not contain valid
file attributes, ArchiveEntryCompleteness.LAST_MODIFIED
entries can occur if the
archive has been created or updated on a non-POSIX (read: Microsoft Windows) machine.
public java.lang.String getLinkTarget()
hasLinkTarget()
public boolean hasLinkTarget()
true
, if this entry has a meaningful link target.getLinkTarget()
public ch.systemsx.cisd.base.unix.FileLinkType getLinkType()
public boolean isDirectory()
FileLinkType.DIRECTORY
.public boolean isSymLink()
FileLinkType.SYMLINK
.public boolean isRegularFile()
FileLinkType.REGULAR_FILE
.public long getSize()
isRegularFile()
public long getLastModified()
public java.lang.String getLastModifiedStr()
public boolean hasChecksum()
true
, if this archive entry has a CRC32 checksum stored.public int getCrc32()
isRegularFile()
public java.lang.String getCrc32Str()
isRegularFile()
public java.lang.String getUser(boolean numeric)
Note that the archive only stores the UID and it is the local system which is used to resolve the UID to a user.
public int getUid()
public java.lang.String getGroup(boolean numeric)
Note that the archive only stores the GID and it is the local system which is used to resolve the GID to a group.
public int getGid()
public short getPermissions()
public java.lang.String getPermissionsString(boolean numeric)
public java.lang.String tryGetErrorLine()
null
, if no error line
is available. A non-null error line is one indication of a verification error.
Note that the error line may contain additional information when a verification step has failed on the archive entry.
public ch.systemsx.cisd.base.unix.FileLinkType tryGetVerifiedLinkType()
null
, if no verification has been
performed on this entry.
This information may come from an internal test of the archive (see
ListParameters.isTestArchive()
) or from a verification of the archive against the
filesystem (see VerifyParameters
).
public long getVerifiedSize()
public int getVerifiedCrc32()
public java.lang.String getVerifiedCrc32Str()
isRegularFile()
public long getVerifiedLastModified()
public java.lang.String getVerifiedLastModifiedStr()
public boolean hasVerificationInfo()
public boolean isOK()
true
if this archive entry has been verified successfully (or if no
verification information is available).public boolean linkTypeOK()
true
if this the type of this archive entry has been verified
successfully (or if no verification information for the type is available).public boolean sizeOK()
true
if this the size of this archive entry has been verified
successfully (or if no verification information for the size is available).public boolean lastModifiedOK()
true
if this the last modification date of this archive entry has been
verified successfully (or if no verification information for the last modification date is
available).public boolean checksumOK()
true
if this the checksum of this archive entry has been verified
successfully (or if no verification information for the checksum is available).public java.lang.String getStatus(boolean verbose)
Note that the status will always be OK
if no verification information is
available.
hasVerificationInfo()
public java.lang.String describeLink()
public java.lang.String describeLink(boolean verbose)
verbose
- If true
, the link description will contain all information
available, if false
, it will only contain the path information.public java.lang.String describeLink(boolean verbose, boolean numeric)
verbose
- If true
, the link description will contain all information
available, if false
, it will only contain the path information.numeric
- If true
, file ownership and access permissions will be
represented numerically, if false
, they will be represented as
strings. Only relevant if verbose is true
.public java.lang.String describeLink(boolean verbose, boolean numeric, boolean includeCheck)
verbose
- If true
, the link description will contain all information
available, if false
, it will only contain the path information.numeric
- If true
, file ownership and access permissions will be
represented numerically, if false
, they will be represented as
strings. Only relevant if verbose is true
.includeCheck
- If true
(and if verification information is available for
this entry), add a (brief) verification status string.hasVerificationInfo()
public java.lang.String toString()
toString
in class java.lang.Object