Java File List Load getFilesFromDirectory(final String directory)

Here you can find the source of getFilesFromDirectory(final String directory)

Description

Get all files in the directory.

License

LGPL

Parameter

Parameter Description
directory String, directory to search

Return

File[], files in directory

Declaration

public static File[] getFilesFromDirectory(final String directory) 

Method Source Code


//package com.java2s;
//License from project: LGPL 

import java.io.File;

public class Main {
    /**//from  w w w  .ja  va2s  . c o m
     * Get all files in the directory.
     * 
     * @param directory
     *            String, directory to search
     * @return File[], files in directory
     */
    public static File[] getFilesFromDirectory(final String directory) {
        File dir = new File(directory);
        return dir.listFiles();
    }
}

Related

  1. getFileListingLogs(File aStartingDir)
  2. getFileListingNoSort(File aStartingDir, boolean recursive)
  3. getFilesByExt(String dirName, String ext)
  4. getFilesFromDir(File dir)
  5. getFilesFromDirectory(final File folder)
  6. getFilesFromDirectoryByExtension(File directory, String extension)