@DefaultAnnotation(value=edu.umd.cs.findbugs.annotations.NonNull.class) public abstract class FsEntry extends Object implements Entry
Entry.Access, Entry.Size, Entry.TypeALL_ACCESS_SET, ALL_SIZE_SET, ALL_TYPE_SET, DIRECTORY_TYPE_SET, FILE_TYPE_SET, SPECIAL_TYPE_SET, SYMLINK_TYPE_SET, UNKNOWN| Constructor and Description |
|---|
FsEntry() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object that)
Two file system entries are considered equal if and only if they are
identical.
|
abstract Set<String> |
getMembers()
If this is not a directory entry,
null is returned. |
abstract String |
getName()
Returns a string representation of the
file system entry name. |
abstract Set<Entry.Type> |
getTypes()
Returns a set of types implemented by this entry.
|
int |
hashCode()
Returns a hash code which is consistent with
equals(java.lang.Object). |
boolean |
isType(Entry.Type type)
Returns
true if and only if this file system entry implements
the given type. |
String |
toString()
Returns a string representation of this object for debugging and logging
purposes.
|
public abstract String getName()
file system entry name.getName in interface Entryfile system entry name.EntryName.create(String)public abstract Set<Entry.Type> getTypes()
Some file system types allow an entry to implement multiple entry types.
For example, a ZIP or TAR file may contain a file entry with the name
foo and a directory entry with the name foo/.
Yes, this is strange, but shit happens!
In this case then, a virtual file system should collapse this into one
file system entry which returns true for both
isType(FILE) and isType(DIRECTORY).
public boolean isType(Entry.Type type)
true if and only if this file system entry implements
the given type.type - the type to test.true if and only if this file system entry implements
the given type.getTypes()@Nullable public abstract Set<String> getMembers()
null is returned.
Otherwise, a set of strings is returned which represent the base names
of the members of this directory entry.
Whether or not modifying the returned set is supported and the effect
on the file system is implementation specific.public final boolean equals(Object that)
public final int hashCode()
equals(java.lang.Object).
This can't get overriden.Copyright © 2005-2011 Schlichtherle IT Services. All Rights Reserved.