Package noaa.coastwatch.gui.open
Interface DirectoryLister
- All Superinterfaces:
Cloneable
- All Known Implementing Classes:
AbstractDirectoryLister
,HTTPDirectoryLister
,LocalDirectoryLister
A
DirectoryLister
performs simple directory listing
services, providing the file names in a directory, their size, and
modification times.- Since:
- 3.2.0
- Author:
- Peter Hollemans
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
TheDirectoryLister.Entry
class may be used to access one entry in the contents of a directory lister. -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Clears the directory name and entry list.clone()
Gets an independent copy of this lister.Gets the full child directory name for the specified parent and child.Gets the directory name.Gets the list of directory entries.Gets the parent directory name for the specified directory.void
refresh()
Refreshes the entry list based on the current directory name.void
setDirectory
(String name) Sets the directory name.
-
Method Details
-
getDirectory
String getDirectory()Gets the directory name. -
clone
Object clone()Gets an independent copy of this lister. -
setDirectory
Sets the directory name.- Throws:
IOException
-
getParent
Gets the parent directory name for the specified directory.- Parameters:
name
- the name of the directory to get the parent.- Returns:
- the parent directory. If the directory has no parent, the directory itself is returned.
-
getChild
Gets the full child directory name for the specified parent and child.- Parameters:
parent
- the parent base directory.child
- the child directory within the parent.- Returns:
- the full child directory as a concatentation of parent and child.
-
refresh
Refreshes the entry list based on the current directory name.- Throws:
IOException
-
clear
void clear()Clears the directory name and entry list. -
getEntries
List getEntries()Gets the list of directory entries.
-