Class AbstractDirectoryLister

    • Field Detail

      • m_WatchDir

        protected String m_WatchDir
        the directory to watch.
      • m_ListDirs

        protected boolean m_ListDirs
        whether to list directories.
      • m_ListFiles

        protected boolean m_ListFiles
        whether to list files.
      • m_Sorting

        protected Sorting m_Sorting
        the type of sorting to perform.
      • m_SortDescending

        protected boolean m_SortDescending
        whether to sort descending.
      • m_MaxItems

        protected int m_MaxItems
        the maximum number of files/dirs to return.
      • m_RegExp

        protected BaseRegExp m_RegExp
        the regular expression for the files/dirs to match.
      • m_Stopped

        protected boolean m_Stopped
        whether to stop the currently listing.
    • Constructor Detail

      • AbstractDirectoryLister

        public AbstractDirectoryLister()
        Initializes the object.
    • Method Detail

      • setDebug

        public void setDebug​(boolean value)
        Set debugging mode.
        Parameters:
        value - true if debug output should be printed
      • getDebug

        public boolean getDebug()
        Returns whether debugging is turned on.
        Returns:
        true if debugging output is on
      • setWatchDir

        public void setWatchDir​(String value)
        Sets the directory to watch.
        Specified by:
        setWatchDir in interface DirectoryLister
        Parameters:
        value - the directory
      • setListDirs

        public void setListDirs​(boolean value)
        Sets whether to list directories or not.
        Specified by:
        setListDirs in interface DirectoryLister
        Parameters:
        value - true if directories are included in the list
      • getListDirs

        public boolean getListDirs()
        Returns whether to list directories or not.
        Specified by:
        getListDirs in interface DirectoryLister
        Returns:
        true if directories are listed
      • setListFiles

        public void setListFiles​(boolean value)
        Sets whether to list files or not.
        Specified by:
        setListFiles in interface DirectoryLister
        Parameters:
        value - true if files are included in the list
      • getListFiles

        public boolean getListFiles()
        Returns whether to list files or not.
        Specified by:
        getListFiles in interface DirectoryLister
        Returns:
        true if files are listed
      • setSorting

        public void setSorting​(Sorting value)
        Sets the sorting type.
        Specified by:
        setSorting in interface DirectoryLister
        Parameters:
        value - the sorting
      • setSortDescending

        public void setSortDescending​(boolean value)
        Sets whether to sort in descending manner.
        Specified by:
        setSortDescending in interface DirectoryLister
        Parameters:
        value - true if desending sort manner
      • getSortDescending

        public boolean getSortDescending()
        Returns whether to sort in descending manner.
        Specified by:
        getSortDescending in interface DirectoryLister
        Returns:
        true if descending sort manner
      • setMaxItems

        public void setMaxItems​(int value)
        Sets the maximum number of items to return.
        Specified by:
        setMaxItems in interface DirectoryLister
        Parameters:
        value - the maximum number, <=0 means unbounded
      • getMaxItems

        public int getMaxItems()
        Returns the maximum number of items to return.
        Specified by:
        getMaxItems in interface DirectoryLister
        Returns:
        the maximum number, <=0 means unbounded
      • setRegExp

        public void setRegExp​(BaseRegExp value)
        Sets the regular expressions that the items have to match.
        Specified by:
        setRegExp in interface DirectoryLister
        Parameters:
        value - the regular expression, "" matches all
      • getRegExp

        public BaseRegExp getRegExp()
        Returns the regular expression that the items have to match.
        Specified by:
        getRegExp in interface DirectoryLister
        Returns:
        the regular expression, "" matches all
      • stopExecution

        public void stopExecution()
        Stops the current list generation.
        Specified by:
        stopExecution in interface Stoppable
      • isStopped

        public boolean isStopped()
        Checks whether the list generation has been stopped.
        Specified by:
        isStopped in interface StoppableWithFeedback
        Returns:
        true if stopped
      • toString

        public String toString()
        A string representation of the object.
        Overrides:
        toString in class Object
        Returns:
        the string representation