Here you can find the source of getFiles(String parent)
public static List<File> getFiles(String parent)
//package com.java2s; //License from project: Apache License import java.io.*; import java.util.ArrayList; import java.util.List; public class Main { public static List<File> getFiles(String parent) { File parentFile = new File(parent); File[] files = parentFile.listFiles(); List<File> sonFiles = new ArrayList<File>(); if (parentFile.exists()) { for (File temp : files) { if (temp.isFile()) { sonFiles.add(temp);/* w w w . ja v a 2 s . c o m*/ } } } return sonFiles; } }