Package com.uwyn.jhighlight.tools
Class FileUtils
- java.lang.Object
-
- com.uwyn.jhighlight.tools.FileUtils
-
public abstract class FileUtils extends java.lang.Object
Collection of utility methods to work with files.- Since:
- 1.0
- Version:
- $Revision: 3108 $
-
-
Constructor Summary
Constructors Modifier Constructor Description private
FileUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
getExtension(java.lang.String fileName)
static java.util.ArrayList
getFileList(java.io.File file, java.util.regex.Pattern[] included, java.util.regex.Pattern[] excluded)
Recursively traverse a directory hierachy and obtain a list of all absolute file names.private static java.util.ArrayList
getFileList(java.io.File file, java.util.regex.Pattern[] included, java.util.regex.Pattern[] excluded, boolean root)
-
-
-
Method Detail
-
getFileList
public static java.util.ArrayList getFileList(java.io.File file, java.util.regex.Pattern[] included, java.util.regex.Pattern[] excluded)
Recursively traverse a directory hierachy and obtain a list of all absolute file names.Regular expression patterns can be provided to explicitly include and exclude certain file names.
- Parameters:
file
- the directory whose file hierarchy will be traversedincluded
- an array of regular expression patterns that will be used to determine which files should be included; ornull
if all files should be includedexcluded
- an array of regular expression patterns that will be used to determine which files should be excluded; ornull
if no files should be excluded- Returns:
- the list of absolute file names
- Since:
- 1.0
-
getFileList
private static java.util.ArrayList getFileList(java.io.File file, java.util.regex.Pattern[] included, java.util.regex.Pattern[] excluded, boolean root)
-
getExtension
public static java.lang.String getExtension(java.lang.String fileName)
-
-