File f = new File(absPath);
return f.isDirectory() && !f.getName().equals("thumb");
}
};
Cliparts cl = new Cliparts();
cl.setFolderName("general");
String[] files_general = clipart_dir.list(getFilesOnly);
@SuppressWarnings("unchecked")
Comparator<String> comparator = ComparatorUtils.naturalComparator();
Arrays.sort(files_general, comparator);
cl.setGeneralList(files_general);
cl.setSubCategories(new LinkedList<Cliparts>());
for (File dir : clipart_dir.listFiles(getDirectoriesOnly)) {
Cliparts cl_sub = new Cliparts();
cl_sub.setFolderName("math");
String[] files = dir.list(getFilesOnly);
Arrays.sort(files, comparator);
cl_sub.setGeneralList(files);
cl.getSubCategories().add(cl_sub);
}
return cl;