Here you can find the source of recursiveListFiles(String path)
Parameter | Description |
---|---|
path | a parameter |
public static List<File> recursiveListFiles(String path)
//package com.java2s; //License from project: Open Source License import java.io.File; import java.util.ArrayList; import java.util.Arrays; import java.util.List; public class Main { /**//from w ww . ja va 2 s. c om * @param path * @return */ public static List<File> recursiveListFiles(String path) { List<File> result = new ArrayList<File>(Arrays.asList(new File(path).listFiles())); for (File f : new File(path).listFiles()) if (f.isDirectory()) result.addAll(recursiveListFiles(f.getAbsolutePath())); return result; } }