Here you can find the source of getFileList(File dirFile, final String filenamePrefix)
public static File[] getFileList(File dirFile, final String filenamePrefix)
//package com.java2s; import java.io.File; import java.io.FilenameFilter; public class Main { public static File[] getFileList(File dirFile, final String filenamePrefix) { File[] subFiles = dirFile.listFiles(new FilenameFilter() { @Override/*from ww w .j a v a 2 s. c o m*/ public boolean accept(File dir, String name) { File f = new File(dir + File.separator + name); return f.isFile() && name.startsWith(filenamePrefix); } }); return subFiles; } }