Package org.apache.commons.io.filefilter

Examples of org.apache.commons.io.filefilter.SuffixFileFilter


        IOFileFilter filter;
        if (extensions == null) {
            filter = TrueFileFilter.INSTANCE;
        } else {
            String[] suffixes = toSuffixes(extensions);
            filter = new SuffixFileFilter(suffixes);
        }
        return listFiles(directory, filter,
            (recursive ? TrueFileFilter.INSTANCE : FalseFileFilter.INSTANCE));
    }
View Full Code Here


        if (path.segment(0).equals("*")) {
            filter = new NameFileFilter(path.lastSegment());
        } else {
            String lastSegment = path.lastSegment();
            if (lastSegment.startsWith("*")) {
                filter = new SuffixFileFilter(lastSegment.substring(1));
            } else {
                filter = null;
            }
        }
        Vector results = new Vector();
View Full Code Here

      IOCase ioCase = ignoreCase ? IOCase.INSENSITIVE    : IOCase.SENSITIVE;
      filter = new NameFileFilter(path.lastSegment(), ioCase);
    } else {
      String lastSegment = path.lastSegment();
      if (lastSegment.startsWith("*")) {
        filter = new SuffixFileFilter(lastSegment.substring(1));
      } else {
        filter = null;
      }
    }
 
View Full Code Here

        IOFileFilter filter;
        if (extensions == null) {
            filter = TrueFileFilter.INSTANCE;
        } else {
            final String[] suffixes = toSuffixes(extensions);
            filter = new SuffixFileFilter(suffixes);
        }
        return listFiles(directory, filter,
            recursive ? TrueFileFilter.INSTANCE : FalseFileFilter.INSTANCE);
    }
View Full Code Here

      }
    }
  }

  private File findClassesDir(File dir) {
    Collection<File> files = FileUtils.listFiles(dir, new SuffixFileFilter(
        ".class"), TrueFileFilter.TRUE);
    if (files != null && files.size() > 0) {
      return files.iterator().next().getParentFile();
    }
    return null;
View Full Code Here

     * @return IOFileFilter font file filter
     */
    protected static IOFileFilter getFileFilter() {
        return FileFilterUtils.andFileFilter(
                FileFilterUtils.fileFileFilter(),
                new SuffixFileFilter(new String[] {".ttf", ".otf", ".pfb"})
                //TODO Add *.ttc when support for it has been added to the auto-detection mech.
        );
    }
View Full Code Here

        String startsWith = System.getProperty("fop.layoutengine.starts-with");
        if (single != null) {
            filter = new NameFileFilter(single);
        } else if (startsWith != null) {
            filter = new PrefixFileFilter(startsWith);
            filter = new AndFileFilter(filter, new SuffixFileFilter(".xml"));
            filter = decorateWithDisabledList(filter);
        } else {
            filter = new SuffixFileFilter(".xml");
            filter = decorateWithDisabledList(filter);
        }
        String testset = System.getProperty("fop.layoutengine.testset");
        if (testset == null) {
            testset = "standard";
View Full Code Here

            boolean createDiffs = cfg.getChild("create-diffs").getValueAsBoolean(true);
           
            //RUN!
            BufferedImage[] bitmaps = new BufferedImage[producers.length];
           
            IOFileFilter filter = new SuffixFileFilter(new String[] {".xml", ".fo"});
            //Same filtering as in layout engine tests
            if (cfg.getChild("filter-disabled").getValueAsBoolean(true)) {
                filter = LayoutEngineTestSuite.decorateWithDisabledList(filter);
            }
View Full Code Here

        IOFileFilter filter;
        if (extensions == null) {
            filter = TrueFileFilter.INSTANCE;
        } else {
            String[] suffixes = toSuffixes(extensions);
            filter = new SuffixFileFilter(suffixes);
        }
        return listFiles(directory, filter,
            (recursive ? TrueFileFilter.INSTANCE : FalseFileFilter.INSTANCE));
    }
View Full Code Here

        IOFileFilter filter;
        if (extensions == null) {
            filter = TrueFileFilter.INSTANCE;
        } else {
            String[] suffixes = toSuffixes(extensions);
            filter = new SuffixFileFilter(suffixes);
        }
        return listFiles(directory, filter,
            (recursive ? TrueFileFilter.INSTANCE : FalseFileFilter.INSTANCE));
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.io.filefilter.SuffixFileFilter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.