Here you can find the source of getFiles(File folder)
public static File[] getFiles(File folder)
//package com.java2s; //License from project: Open Source License import java.io.File; public class Main { public static File[] getFiles(File folder) { if (folder != null && folder.exists()) { File[] files = folder.listFiles(); if (files != null) return files; }/* www. j a va 2s . com*/ return new File[0]; } }