|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.pmd.util.FileUtil
public final class FileUtil
This is a utility class for working with Files.
Method Summary | |
---|---|
static List<DataSource> |
collectFiles(String fileLocations,
FilenameFilter filenameFilter)
Collects a list of DataSources using a comma separated list of input file locations to process. |
static boolean |
findPatternInFile(File file,
String pattern)
Handy method to find a certain pattern into a file. |
static String |
getFileNameWithoutExtension(String fileName)
Helper method to get a filename without its extension |
static String |
normalizeFilename(String fileName)
Normalizes the filename by taking the casing into account, e.g. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static String getFileNameWithoutExtension(String fileName)
fileName
- String
public static String normalizeFilename(String fileName)
fileName
- the file name
public static List<DataSource> collectFiles(String fileLocations, FilenameFilter filenameFilter)
fileLocations
- A comma-separated list of file locations.filenameFilter
- The FilenameFilter to apply to files.
public static boolean findPatternInFile(File file, String pattern)
file
- pattern
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |