Java Utililty Methods File List Load

List of utility methods to do File List Load

Description

The list of methods to do File List Load are organized into topic(s).

Method

ListgetFilesFromDirectory(final File folder)
get Files From Directory
List<File> fileList = new ArrayList<>();
File[] list = folder.listFiles();
if (list == null) {
    return fileList;
for (final File fileEntry : list) {
    if (!fileEntry.isDirectory()) {
        fileList.add(fileEntry);
...
File[]getFilesFromDirectory(final String directory)
Get all files in the directory.
File dir = new File(directory);
return dir.listFiles();
ListgetFilesFromDirectoryByExtension(File directory, String extension)
get Files From Directory By Extension
String[] extensions = { extension };
return getFilesFromDirectoryByExtension(directory, extensions);