Java File List Load getFileList(String path)

Here you can find the source of getFileList(String path)

Description

get File List

License

Open Source License

Declaration

public static File[] getFileList(String path) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.io.File;
import java.io.FileFilter;

public class Main {
    public static File[] getFileList(String path) {
        File[] fileList = new File(path).listFiles(new FileFilter() {
            @Override/*from  ww  w. j av a2s .c o  m*/
            public boolean accept(File pathname) {
                String str = pathname.getName().toLowerCase();
                if (str.endsWith(".nes") || str.endsWith(".zip"))
                    return true;
                else
                    return false;
            }
        });

        return fileList;
    }
}

Related

  1. getFileList(String filePath, FileFilter fileFilter, boolean recursive)
  2. getFileList(String folderPath)
  3. getFileList(String inputFilename)
  4. getFileList(String path)
  5. getFileList(String path)
  6. getFileList(String path)
  7. getFileList(String path)
  8. getFileList(String path, String filterName)
  9. getFileList(String path, String regex)