net.firstpartners.nounit.utility
Class DirectoryWalker
java.lang.Object
|
+--net.firstpartners.nounit.utility.DirectoryWalker
- public class DirectoryWalker
- extends java.lang.Object
'Walks' the directory structure and returns files found (including those in sub folders)
Method Summary |
static java.util.HashSet |
getDirs(java.lang.String startingDirectory)
Get all the Directories in the starting directory (and sub dirs)
returns only files ending this the filename |
static java.util.HashSet |
getFiles(java.lang.String startingDirectory)
Get all the files in the starting directory (and sub dirs)
No filter |
static java.util.HashSet |
getFiles(java.lang.String startingDirectory,
java.lang.String endFileName)
Get all the files in the starting directory (but NOT sub dirs)
returns only files ending this the filename |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DirectoryWalker
public DirectoryWalker()
getFiles
public static java.util.HashSet getFiles(java.lang.String startingDirectory)
throws java.io.IOException
- Get all the files in the starting directory (and sub dirs)
No filter
- Parameters:
startingDirectory
- - Returns:
- filesFound (as HashSet)
- Throws:
java.io.IOException
-
getFiles
public static java.util.HashSet getFiles(java.lang.String startingDirectory,
java.lang.String endFileName)
throws java.io.IOException
- Get all the files in the starting directory (but NOT sub dirs)
returns only files ending this the filename
- Parameters:
startingDirectory
- - Returns:
- filesFound (as HashSet)
- Throws:
java.io.IOException
-
getDirs
public static java.util.HashSet getDirs(java.lang.String startingDirectory)
throws java.io.IOException
- Get all the Directories in the starting directory (and sub dirs)
returns only files ending this the filename
- Parameters:
startingDirectory
- - Returns:
- filesFound (as HashSet)
- Throws:
java.io.IOException
-