|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FsDirectoryEntry
Represents one entry in a FsDirectory
.
Field Summary | |
---|---|
static Comparator<FsDirectoryEntry> |
DIRECTORY_ENTRY_COMPARATOR
Compares directory entries alphabetically, with all directories coming before all files. |
Method Summary | |
---|---|
long |
getCreated()
Returns the time when this entry was created as ms since 1970. |
FsDirectory |
getDirectory()
Gets the directory this entry refers to. |
FsFile |
getFile()
Gets the file this entry refers to. |
long |
getLastAccessed()
Returns the time when this entry was last accessed as ms since 1970. |
long |
getLastModified()
Gets the last modification time of this entry. |
String |
getName()
Gets the name of this entry. |
FsDirectory |
getParent()
Deprecated. deprecated since version 0.6 because in the presence of hard links it might not always be possible to determine the parent directory of an entry |
boolean |
isDirectory()
Is this entry refering to a (sub-)directory? |
boolean |
isDirty()
Indicate if the entry has been modified in memory (ie need to be saved) |
boolean |
isFile()
Is this entry refering to a file? |
void |
setLastModified(long lastModified)
Sets the last modification time of this entry. |
void |
setName(String newName)
Sets the name of this entry. |
Methods inherited from interface de.waldheinz.fs.FsObject |
---|
isReadOnly, isValid |
Field Detail |
---|
static final Comparator<FsDirectoryEntry> DIRECTORY_ENTRY_COMPARATOR
Method Detail |
---|
String getName()
@Deprecated FsDirectory getParent()
null
long getLastModified() throws IOException
0
if this filesystem does not support
getting the last modification time
IOException
- if an error occurs retrieving the time stamplong getCreated() throws IOException
IOException
- on error retrieving the time stamplong getLastAccessed() throws IOException
IOException
- on error retrieving the last access timeboolean isFile()
boolean isDirectory()
void setName(String newName) throws IOException
newName
- the new name of this entry
IOException
- on error setting the new namevoid setLastModified(long lastModified) throws IOException
lastModified
- the new last modification time of this entry
IOException
- on write errorFsFile getFile() throws IOException
isFile
returns true
.
IOException
- on error accessing the fileFsDirectory getDirectory() throws IOException
isDirectory
returns true.
IOException
- on read errorboolean isDirty()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |