public final class FileUtil extends Object
Modifier and Type | Method and Description |
---|---|
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.
|
public static String getFileNameWithoutExtension(String fileName)
fileName
- Stringpublic static String normalizeFilename(String fileName)
fileName
- the file namepublic 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
- Copyright © 2002-2017 PMD. All Rights Reserved.