Class FilenameLoader


  • public class FilenameLoader
    extends java.lang.Object
    This utility-class loads selected filenames of a directory into a list.
    Since:
    1.1.0
    • Constructor Summary

      Constructors 
      Constructor Description
      FilenameLoader()
      The default constructor (no filters, no recursion).
      FilenameLoader​(java.io.FilenameFilter pFilter)
      Create an instance with given filter and recursion-mode
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void load​(java.io.File pDir, java.util.List<java.lang.String> pNames)
      Load files in the given directory and store the results in the given list.
      java.util.List<java.lang.String> loadFilenames​(java.lang.String pDir)
      Load filenames in the given directory.
      void setFilter​(java.io.FilenameFilter pFilter)
      Set the filter for this instance.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FilenameLoader

        public FilenameLoader()
        The default constructor (no filters, no recursion).
      • FilenameLoader

        public FilenameLoader​(java.io.FilenameFilter pFilter)
        Create an instance with given filter and recursion-mode
        Parameters:
        pFilter - The FilenameFilter to use
    • Method Detail

      • setFilter

        public void setFilter​(java.io.FilenameFilter pFilter)
        Set the filter for this instance.
        Parameters:
        pFilter - The FilenameFilter to use
      • loadFilenames

        public java.util.List<java.lang.String> loadFilenames​(java.lang.String pDir)
        Load filenames in the given directory.
        Parameters:
        pDir - The directory to search
        Returns:
        List of filenames
      • load

        public void load​(java.io.File pDir,
                         java.util.List<java.lang.String> pNames)
        Load files in the given directory and store the results in the given list.
        Parameters:
        pDir - The directory to search
        pNames - The result-list