List of utility methods to do File List Load
void | getFileList(File dir, ArrayList get File List if (dir == null || !dir.exists()) return; list.add(dir); if (dir.isFile()) { return; File[] files = dir.listFiles(); if (files == null) ... |
boolean | getFileList(File dir, Set Gets file list. return getFileList(dir, null, arrayList);
|
ArrayList | getFileList(File dir, String regex) get File List ArrayList<String> fileList = new ArrayList<String>(); File[] fs = dir.listFiles(); for (int i = 0; i < fs.length; i++) { if (fs[i].isDirectory()) { fileList.addAll(getFileList(fs[i], regex)); } else if (fs[i].isFile() && fs[i].getName().endsWith(regex)) { fileList.add(fs[i].getAbsolutePath()); return fileList; |
File[] | getFileList(File dirFile, final String filenamePrefix) get File List File[] subFiles = dirFile.listFiles(new FilenameFilter() { @Override public boolean accept(File dir, String name) { File f = new File(dir + File.separator + name); return f.isFile() && name.startsWith(filenamePrefix); }); return subFiles; ... |
List | getFileList(File f) Gets a list of files in the specified dir. List<File> fileList = new ArrayList<File>(); File[] files = f.listFiles(); if (files != null) { for (File file : files) { if (!file.isDirectory()) fileList.add(file); return fileList; |
void | getFileList(File f, FileFilter filter, boolean recursive, boolean wantDirectory, boolean wantHidden, ArrayList Get file list from specified directory applying the specified parameters final File[] files = f.listFiles(filter); if (files != null) { for (File file : files) { if ((!file.isHidden()) || wantHidden) { if (file.isDirectory()) { if (wantDirectory) list.add(file); if (recursive) ... |
File[] | getFileList(File file) Get complete list of files in folder if (file.isFile() && !file.isDirectory()) { return new File[] { file }; return file.listFiles() != null ? file.listFiles() : new File[0]; |
Collection | getFileList(File file) get File List return getFileList(file, true);
|
List | getFileList(File file, String[] suffixs) get File List return getFileList(file, new ArrayList<File>(), suffixs, null, null); |
List | getFileList(File folder, String type) get File List List<File> fileNameList = new ArrayList<File>(); File[] files = folder.listFiles(); for (File file : files) { if (getFileType(file).equalsIgnoreCase(type)) { fileNameList.add(file); return fileNameList; ... |