Here you can find the source of getAllFilesFromFolder(File sampleFolder, ArrayList
Parameter | Description |
---|---|
sampleFolder | a parameter |
arrayList | a parameter |
filenameFilter | a parameter |
public static void getAllFilesFromFolder(File sampleFolder, ArrayList<File> fileList, FilenameFilter filenameFilter)
//package com.java2s; // %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt import java.io.File; import java.io.FileFilter; import java.io.FilenameFilter; import java.util.ArrayList; import java.util.Collections; public class Main { /**/*from w w w . j a v a 2 s. c om*/ * DOC sgandon Comment method "getAllFilesFromFolder". * * @param sampleFolder * @param arrayList * @param filenameFilter */ public static void getAllFilesFromFolder(File sampleFolder, ArrayList<File> fileList, FilenameFilter filenameFilter) { File[] folderFiles = sampleFolder.listFiles(filenameFilter); Collections.addAll(fileList, folderFiles); File[] allFolders = sampleFolder.listFiles(new FileFilter() { public boolean accept(File arg0) { return arg0.isDirectory(); } }); for (File folder : allFolders) { getAllFilesFromFolder(folder, fileList, filenameFilter); } } }