public static List<FileItem> getList(File rootPath, String[] exts) { List<File> list = FileDirUtils.getList(rootPath, MP3_WITH_DIR_FILTER); LOG.d("getList size", rootPath, list.size()); final List<FileItem> items = new ArrayList<FileItem>(); for (File file : list) { items.add(new FileItem(file)); } return items; }
public static List<FileItem> getFilesByPath(File rootPath) { LOG.d("get getFilesByPath", rootPath.getPath()); List<File> listFiles = FileDirUtils.getList(rootPath, MP3_FILTER); List<FileItem> items = new ArrayList<FileItem>(); for (File file : listFiles) { items.add(new FileItem(file)); } return items; }