String absolutePath = getRealUserFilesAbsolutePath(RequestCycleHandler
.getUserFilesAbsolutePath(ThreadLocalData.getRequest()));
File typeDir = getOrCreateResourceTypeDir(absolutePath, type);
File currentDir = new File(typeDir, currentFolder);
if (!currentDir.exists() || !currentDir.isDirectory())
throw new InvalidCurrentFolderException();
// collect files
List<Map<String, Object>> files;
Map<String, Object> fileMap;
File[] fileList = currentDir