Here you can find the source of getResourceList(File fdir, String extn)
public static String[] getResourceList(File fdir, String extn)
//package com.java2s; //License from project: Open Source License import java.io.File; import java.util.ArrayList; public class Main { public static String[] getResourceList(File fdir, String extn) { ArrayList<String> als = new ArrayList<String>(); for (File f : fdir.listFiles()) { String fnm = f.getName(); if (fnm.endsWith(extn)) { als.add(fnm.substring(0, fnm.length())); // - extn.length())); }// w w w. j a v a 2s . co m } return als.toArray(new String[als.size()]); } }