public interface Entry
In general, if a property has an unknown value, its getter method must
return the value UNKNOWN
or null
respectively.
Some constants of this interface are unmodifiable sets of enums. These are convenient to use for loops like this:
for (Type type : ALL_TYPES)
...;
MutableEntry
Modifier and Type | Interface and Description |
---|---|
static class |
Entry.Access
Defines the type of access information for an entry.
|
static interface |
Entry.Entity
Defines access entities.
|
static class |
Entry.PosixEntity
Defines access entities for POSIX systems.
|
static class |
Entry.Size
Defines the type of size information for an entry.
|
static class |
Entry.Type
Defines the type of an entry.
|
Modifier and Type | Field and Description |
---|---|
static BitField<Entry.Access> |
ALL_ACCESS
A bit field of all enums in
Entry.Access . |
static BitField<Entry.Access> |
ALL_POSIX_ACCESS
|
static BitField<Entry.PosixEntity> |
ALL_POSIX_ENTITIES
A bit field of all enums in
Entry.PosixEntity . |
static BitField<Entry.Size> |
ALL_SIZES
A bit field of all enums in
Entry.Size . |
static BitField<Entry.Type> |
ALL_TYPES
A bit field of all enums in
Entry.Type . |
static BitField<Entry.Type> |
DIRECTORY_TYPE
A bit field of just
Entry.Type.DIRECTORY . |
static BitField<Entry.Type> |
FILE_TYPE
A bit field of just
Entry.Type.FILE . |
static BitField<Entry.Access> |
NO_ACCESS
A bit field of no enums in
Entry.Access . |
static BitField<Entry.PosixEntity> |
NO_POSIX_ENTITIES
A bit field of no enums in
Entry.PosixEntity . |
static BitField<Entry.Size> |
NO_SIZES
A bit field of no enums in
Entry.Size . |
static BitField<Entry.Type> |
NO_TYPES
A bit field of no enums in
Entry.Type . |
static BitField<Entry.Type> |
SPECIAL_TYPE
A bit field of just
Entry.Type.SPECIAL . |
static BitField<Entry.Type> |
SYMLINK_TYPE
A bit field of just
Entry.Type.SYMLINK . |
static byte |
UNKNOWN
The unknown value for numeric properties, which is -1.
|
Modifier and Type | Method and Description |
---|---|
String |
getName()
Returns the entry name.
|
long |
getSize(Entry.Size type)
Returns the size of the given
type for this entry in bytes or
UNKNOWN if not defined or the type is not supported. |
long |
getTime(Entry.Access type)
Returns the time of the given access
type for this entry in
milliseconds since the epoch or -1 if not
defined or the type is not supported. |
Boolean |
isPermitted(Entry.Access type,
Entry.Entity entity)
Returns
true or false if the given access type
to this entry for the given entity is respectively permitted or
denied. |
static final BitField<Entry.Access> ALL_ACCESS
Entry.Access
.static final BitField<Entry.Access> ALL_POSIX_ACCESS
static final BitField<Entry.PosixEntity> ALL_POSIX_ENTITIES
Entry.PosixEntity
.static final BitField<Entry.Size> ALL_SIZES
Entry.Size
.static final BitField<Entry.Type> ALL_TYPES
Entry.Type
.static final BitField<Entry.Type> DIRECTORY_TYPE
Entry.Type.DIRECTORY
.static final BitField<Entry.Type> FILE_TYPE
Entry.Type.FILE
.static final BitField<Entry.Access> NO_ACCESS
Entry.Access
.static final BitField<Entry.PosixEntity> NO_POSIX_ENTITIES
Entry.PosixEntity
.static final BitField<Entry.Size> NO_SIZES
Entry.Size
.static final BitField<Entry.Type> NO_TYPES
Entry.Type
.static final BitField<Entry.Type> SPECIAL_TYPE
Entry.Type.SPECIAL
.static final BitField<Entry.Type> SYMLINK_TYPE
Entry.Type.SYMLINK
.static final byte UNKNOWN
String getName()
'/'
or '\\'
or both, according to the rules of the
Container.
This implies that a segment cannot contain separator characters.
"."
) or
dot-dot (".."
) segments which represent the current or
parent segment respectively.
"foo/bar/"
and
"./abc/../foo/./def/./../bar/."
both refer to the same entry
when being parsed.long getSize(Entry.Size type)
type
for this entry in bytes or
UNKNOWN
if not defined or the type is not supported.
This method may not be meaningful for non-Entry.Type.FILE
entries.type
- the type of the size.type
for this entry in bytes or
UNKNOWN
if not defined or the type is not supported.long getTime(Entry.Access type)
type
for this entry in
milliseconds since the epoch or -1 if not
defined or the type is not supported.type
- the type of the access.type
for this entry in
milliseconds since the epoch or -1 if not
defined or the type is not supported.@CheckForNull Boolean isPermitted(Entry.Access type, Entry.Entity entity)
true
or false
if the given access type
to this entry for the given entity
is respectively permitted or
denied.
Returns null
if not defined or the access type or entity is
not supported.type
- the type of the access.entity
- the entity which desires access.true
if and only if the given access type
to
this entry is permitted for the given entity
.Copyright © 2012–2014 Schlichtherle IT Services. All rights reserved.