@Override public boolean isDirectory() { return mfile.isDirectory(); }
@Override public boolean isCollection() { return mfile.isDirectory(); }
private MFile nextFilteredFile() { if (orgIter == null) return null; if (!orgIter.hasNext()) return null; MFile pdata = orgIter.next(); while ((pdata.isDirectory() != wantDirs) || !mc.accept(pdata)) { // skip directories, and filter if (!orgIter.hasNext()) return null; /// 6 pdata = orgIter.next(); } return pdata; } }
private MFile nextFilteredFile() { if (orgIter == null) return null; if (!orgIter.hasNext()) return null; MFile pdata = orgIter.next(); while ((pdata.isDirectory() != wantDirs) || !mc.accept(pdata)) { // skip directories, and filter if (!orgIter.hasNext()) return null; /// 6 pdata = orgIter.next(); } return pdata; } }
private MFile nextFilteredFile() { if (orgIter == null) return null; if (!orgIter.hasNext()) return null; MFile pdata = orgIter.next(); while ((pdata.isDirectory() != wantDirs) || !mc.accept(pdata)) { // skip directories, and filter if (!orgIter.hasNext()) return null; pdata = orgIter.next(); } return pdata; } }
private MFile nextFilteredFile() { if (orgIter == null) return null; if (!orgIter.hasNext()) return null; MFile pdata = orgIter.next(); while ((pdata.isDirectory() != wantDirs) || !mc.accept(pdata)) { // skip directories, and filter if (!orgIter.hasNext()) return null; /// 6 pdata = orgIter.next(); } return pdata; } }
public int compare(MFile o1, MFile o2) { if (o1.isDirectory() != o2.isDirectory()) return o1.isDirectory() ? 1 : -1; if (isSortIncreasing) return o1.getName().compareTo(o2.getName()); else return o2.getName().compareTo(o1.getName()); } });
private boolean accept(MFile mfile) { if (mfile.isDirectory()) return dirFilters == null || dirFilters.accept(mfile); return fileFilters == null || fileFilters.accept(mfile); }
public boolean isLeafDirectory() throws IOException { int countDir=0, countFile=0, count =0; try (CloseableIterator<MFile> iter = getFileIterator()) { while (iter.hasNext() && count++ < 100) { MFile file = iter.next(); if (file.isDirectory()) countDir++; else countFile++; } } return countFile > countDir; }
if (mfile.isDirectory()) continue;
DatasetBuilder ds; if (mfile.isDirectory()) { CatalogRefBuilder catref = new CatalogRefBuilder(top); catref.setTitle(makeName(mfile));