Interface DirectoryLister

    • Method Detail

      • setWatchDir

        void setWatchDir​(String value)
        Sets the directory to watch.
        Parameters:
        value - the directory
      • getWatchDir

        String getWatchDir()
        Returns the directory to watch.
        Returns:
        the directory
      • setListDirs

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

        boolean getListDirs()
        Returns whether to list directories or not.
        Returns:
        true if directories are listed
      • setListFiles

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

        boolean getListFiles()
        Returns whether to list files or not.
        Returns:
        true if files are listed
      • setSorting

        void setSorting​(Sorting value)
        Sets the sorting type.
        Parameters:
        value - the sorting
      • getSorting

        Sorting getSorting()
        Returns the sorting type.
        Returns:
        the sorting
      • setSortDescending

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

        boolean getSortDescending()
        Returns whether to sort in descending manner.
        Returns:
        true if descending sort manner
      • setMaxItems

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

        int getMaxItems()
        Returns the maximum number of items to return.
        Returns:
        the maximum number, <=0 means unbounded
      • setRegExp

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

        BaseRegExp getRegExp()
        Returns the regular expression that the items have to match.
        Returns:
        the regular expression, "" matches all
      • isLocal

        boolean isLocal()
        Returns whether the directory lister operates locally or remotely.
        Returns:
        true if local lister
      • hasParentDirectory

        boolean hasParentDirectory()
        Returns whether the watch directory has a parent directory.
        Returns:
        true if parent directory available
      • newDirectory

        FileObject newDirectory​(String dir)
        Returns a new directory relative to the watch directory.
        Parameters:
        dir - the directory name
        Returns:
        the new wrapper
      • newDirectory

        FileObject newDirectory​(String parent,
                                String dir)
        Returns a new directory generated from parent and sub-directory.
        Parameters:
        parent - the parent directory
        dir - the directory name
        Returns:
        the new wrapper
      • list

        String[] list()
        Returns the list of files/directories in the watched directory. In case the execution gets stopped, this method returns a 0-length array.
        Returns:
        the list of absolute file/directory names
      • listObjects

        FileObject[] listObjects()
        Returns the list of files/directories in the watched directory. In case the execution gets stopped, this method returns a 0-length array.
        Returns:
        the list of file/directory wrappers