Interface DirectoryLister

All Superinterfaces:
Cloneable
All Known Implementing Classes:
AbstractDirectoryLister, HTTPDirectoryLister, LocalDirectoryLister

public interface DirectoryLister extends Cloneable
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 Classes
    Modifier and Type
    Interface
    Description
    static class 
    The DirectoryLister.Entry class may be used to access one entry in the contents of a directory lister.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Clears the directory name and entry list.
    Gets an independent copy of this lister.
    getChild(String parent, String child)
    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
    Refreshes the entry list based on the current directory name.
    void
    Sets the directory name.
  • Method Details

    • getDirectory

      String getDirectory()
      Gets the directory name.
    • clone

      Object clone()
      Gets an independent copy of this lister.
    • setDirectory

      void setDirectory(String name) throws IOException
      Sets the directory name.
      Throws:
      IOException
    • getParent

      String getParent(String name)
      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

      String getChild(String parent, String child)
      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

      void refresh() throws IOException
      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.