@Override public List<RepositoryFile> getFiles(final String prefix, final String extension) { File[] files = _file.listFiles(createFileFilter(prefix, extension)); Arrays.sort(files, ToStringComparator.getComparator()); return CollectionUtils.map( files, new Func<File, RepositoryFile>() { @Override public RepositoryFile eval(File file) { return (RepositoryFile) getChildCache().getUnchecked(file); } }); }
@Override public List<RepositoryFolder> getFolders() { File[] directories = _file.listFiles( new FileFilter() { @Override public boolean accept(File file) { if (file.isDirectory() && !file.isHidden() && !file.getName().startsWith(".")) { return true; } return false; } }); return CollectionUtils.map( directories, new Func<File, RepositoryFolder>() { @Override public RepositoryFolder eval(File directory) { return (RepositoryFolder) getChildCache().getUnchecked(directory); } }); }