public class FileUtils extends Object
Constructor and Description |
---|
FileUtils() |
Modifier and Type | Method and Description |
---|---|
static List<File> |
listFilesForFolder(String folder,
List<String> admittedExtensions)
Return the list of files which have been found in the specified directory
and which respect the given constraint.
|
static List<File> |
listFilesForFolder(String folder,
List<String> admittedExtensions,
Integer fileLimit)
Return the list of files which have been found in the specified directory
and which respect the given constraint.
|
static String |
readFile(String path,
Charset encoding) |
public static List<File> listFilesForFolder(String folder, List<String> admittedExtensions, Integer fileLimit)
folder
- the folder in which the files are located (recursively
process the directories)admittedExtensions
- the extensions which are admitted (no
restriction if set to null).fileLimit
- the maximal number of files to consider, null = no
limitspublic static List<File> listFilesForFolder(String folder, List<String> admittedExtensions)
folder
- the folder in which the files are located (recursively
process the directories)admittedExtensions
- the extensions which are admitted (no
restriction if set to null).public static String readFile(String path, Charset encoding) throws IOException
IOException
Copyright © 2014. All rights reserved.