public interface DirectoryLister
extends java.lang.Cloneable
DirectoryLister
performs simple directory listing
services, providing the file names in a directory, their size, and
modification times.Modifier and Type | Interface and Description |
---|---|
static class |
DirectoryLister.Entry
The
DirectoryLister.Entry class may be used to
access one entry in the contents of a directory lister. |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears the directory name and entry list.
|
java.lang.Object |
clone()
Gets an independent copy of this lister.
|
java.lang.String |
getChild(java.lang.String parent,
java.lang.String child)
Gets the full child directory name for the specified parent and
child.
|
java.lang.String |
getDirectory()
Gets the directory name.
|
java.util.List |
getEntries()
Gets the list of directory entries.
|
java.lang.String |
getParent(java.lang.String name)
Gets the parent directory name for the specified directory.
|
void |
refresh()
Refreshes the entry list based on the current directory name.
|
void |
setDirectory(java.lang.String name)
Sets the directory name.
|
java.lang.String getDirectory()
java.lang.Object clone()
void setDirectory(java.lang.String name) throws java.io.IOException
java.io.IOException
java.lang.String getParent(java.lang.String name)
name
- the name of the directory to get the parent.java.lang.String getChild(java.lang.String parent, java.lang.String child)
parent
- the parent base directory.child
- the child directory within the parent.void refresh() throws java.io.IOException
java.io.IOException
void clear()
java.util.List getEntries()