Examples of SuffixFileFilter


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

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

            boolean stopOnException = cfg.getChild("stop-on-exception").getValueAsBoolean(true);
            final boolean createDiffs = cfg.getChild("create-diffs").getValueAsBoolean(true);
           
            //RUN!
           
            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

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

        String startsWith = System.getProperty("fop.fotree.starts-with");
        if (single != null) {
            filter = new NameFileFilter(single);
        } else if (startsWith != null) {
            filter = new PrefixFileFilter(startsWith);
            filter = new AndFileFilter(filter, new SuffixFileFilter(".fo"));
        } else {
            filter = new SuffixFileFilter(".fo");
            filter = LayoutEngineTestSuite.decorateWithDisabledList(filter);
        }
        Collection files = FileUtils.listFiles(new File(mainDir, "testcases"),
                filter, TrueFileFilter.INSTANCE);
        String privateTests = System.getProperty("fop.fotree.private");
View Full Code Here

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

        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

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

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

    pipeline.write(
        lines.parallelDo(IdentityFn.<String>getInstance(), Writables.strings()),
        To.textFile(tmpDir.getFile("output").getAbsolutePath()));
    pipeline.done();

    File[] files = dotfileDir.listFiles((FileFilter)new SuffixFileFilter(".dot"));
    assertEquals(1, files.length);
    String fileName = files[0].getName();
    String fileNamePrefix = URLEncoder.encode(pipeline.getName(), "UTF-8");
    fileNamePrefix = (fileNamePrefix.length() < 150) ? fileNamePrefix : fileNamePrefix.substring(0, 150);
    assertTrue("DOT file name '" + fileName + "' did not start with the pipeline name '" + fileNamePrefix + "'.",
View Full Code Here

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

  @Override
  @NotNull
  public Set<? extends String> getStoredIds() throws FileNotFoundException {
    assert baseDir.exists();
    File[] files = baseDir.listFiles( ( FileFilter ) new SuffixFileFilter( extension ) );
    if ( files == null ) {
      throw new FileNotFoundException( "Could not list files in " + baseDir.getAbsolutePath() );
    }

    Set<String> ids = new HashSet<String>();
View Full Code Here

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

  @NotNull
  @Override
  public Set<? extends String> getIds() throws IOException {
    assert baseDir.exists();
    File[] files = baseDir.listFiles( ( FileFilter ) new SuffixFileFilter( extension ) );
    if ( files == null ) {
      throw new FileNotFoundException( "Could not list files in " + baseDir.getAbsolutePath() );
    }

    Set<String> ids = new HashSet<String>();
View Full Code Here

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

     *
     */
    private boolean compileAllFiles(String tag, File[] inputDirs, File outputDir)
        throws MojoExecutionException
    {
        final IOFileFilter filter = new SuffixFileFilter(".proto");

        boolean seen = false;
        for (File inputDir : inputDirs) {
            if (!inputDir.exists()) {
                continue;
View Full Code Here

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

        String startsWith = System.getProperty("fop.fotree.starts-with");
        if (single != null) {
            filter = new NameFileFilter(single);
        } else if (startsWith != null) {
            filter = new PrefixFileFilter(startsWith);
            filter = new AndFileFilter(filter, new SuffixFileFilter(".fo"));
        } else {
            filter = new SuffixFileFilter(".fo");
            filter = LayoutEngineTestSuite.decorateWithDisabledList(filter);
        }
        Collection files = FileUtils.listFiles(new File(mainDir, "testcases"),
                filter, TrueFileFilter.INSTANCE);
        String privateTests = System.getProperty("fop.fotree.private");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.