Here you can find the source of getFileList(String path)
public static String[] getFileList(String path)
//package com.java2s; //License from project: Open Source License import java.io.File; public class Main { public static String[] getFileList(String path) { File directory = new File(path); if (directory.isDirectory()) { return directory.list(); } else {/*from w ww . j av a2 s. com*/ System.out.println("Lessons directory not found! at " + directory.getAbsolutePath()); return null; } } }