Package org.im4java.utils
Class FilenameLoader
- java.lang.Object
-
- org.im4java.utils.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.
-
-
-
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 searchpNames
- The result-list
-
-