java.lang.Object
imagingbook.common.util.DirectoryWalker
Modern-style directory traversal. Requires Java 1.7 or higher!
- Version:
- 2016/04/05
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncollectFiles
(String startDir) Use this method to recursively collect all files with the initially specified extensions, starting from the given directory.
-
Constructor Details
-
DirectoryWalker
Constructor.- Parameters:
extensions
- a sequence of file extensions like ".jpg", ".gif", ".tif" etc. Note that extensions are case sensitive, i.e., multiple extensions must be supplied if upper/lower case extensions should be considered. Supplynull
to accept *any* file extension.
-
-
Method Details
-
collectFiles
Use this method to recursively collect all files with the initially specified extensions, starting from the given directory. TODO: clean up exception handling.- Parameters:
startDir
- The start directory.- Returns:
- A list of file names.
-