Examples of IOFileFilter


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

            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.IOFileFilter

    private static void addXMLTestCases(TestSuite suite) throws IOException {
        File mainDir = new File("test/fotree");

        final FOTreeTester tester = new FOTreeTester();
       
        IOFileFilter filter;
        String single = System.getProperty("fop.fotree.single");
        String startsWith = System.getProperty("fop.fotree.starts-with");
        if (single != null) {
            filter = new NameFileFilter(single);
        } else if (startsWith != null) {
View Full Code Here

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

     * @return a Collection of File instances containing all the test cases set up for processing.
     * @throws IOException if there's a problem gathering the list of test files
     */
    public static Collection getTestFiles() throws IOException {
        File mainDir = new File("test/layoutengine");
        IOFileFilter filter;
        String single = System.getProperty("fop.layoutengine.single");
        String startsWith = System.getProperty("fop.layoutengine.starts-with");
        if (single != null) {
            filter = new NameFileFilter(single);
        } else if (startsWith != null) {
View Full Code Here

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

        if (fileFilter == null) {
            throw new NullPointerException("Parameter 'fileFilter' is null");
        }
       
        //Setup effective file filter
        IOFileFilter effFileFilter = FileFilterUtils.andFileFilter(fileFilter,
            FileFilterUtils.notFileFilter(DirectoryFileFilter.INSTANCE));
           
        //Setup effective directory filter
        IOFileFilter effDirFilter;
        if (dirFilter == null) {
            effDirFilter = FalseFileFilter.INSTANCE;
        } else {
            effDirFilter = FileFilterUtils.andFileFilter(dirFilter,
                DirectoryFileFilter.INSTANCE);
View Full Code Here

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

     * parameter is null, all files are returned.
     * @param recursive If true all subdirectories are searched, too.
     * @return an collection of java.io.File with the matching files
     */
    public static Collection listFiles(File directory, String[] extensions, boolean recursive) {
        IOFileFilter filter;
        if (extensions == null) {
            filter = TrueFileFilter.INSTANCE;
        } else {
            String[] suffixes = toSuffixes(extensions);
            filter = new SuffixFileFilter(suffixes);
View Full Code Here

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

    }

    public void testListFiles() throws Exception {
        Collection files;
        Collection filenames;
        IOFileFilter fileFilter;
        IOFileFilter dirFilter;
       
        //First, find non-recursively
        fileFilter = FileFilterUtils.trueFileFilter();
        files = FileUtils.listFiles(getLocalTestDirectory(), fileFilter, null);
        filenames = filesToFilenames(files);
View Full Code Here

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

     *
     */
    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.IOFileFilter

    private static void addXMLTestCases(TestSuite suite) throws IOException {
        File mainDir = new File("test/fotree");

        final FOTreeTester tester = new FOTreeTester();

        IOFileFilter filter;
        String single = System.getProperty("fop.fotree.single");
        String startsWith = System.getProperty("fop.fotree.starts-with");
        if (single != null) {
            filter = new NameFileFilter(single);
        } else if (startsWith != null) {
View Full Code Here

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

            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);
            }
            String manualFilter = cfg.getChild("manual-filter").getValue(null);
View Full Code Here

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

     * @return a Collection of File instances containing all the test cases set up for processing.
     * @throws IOException if there's a problem gathering the list of test files
     */
    public static Collection getTestFiles() throws IOException {
        File mainDir = new File("test/layoutengine");
        IOFileFilter filter;
        String single = System.getProperty("fop.layoutengine.single");
        String startsWith = System.getProperty("fop.layoutengine.starts-with");
        if (single != null) {
            filter = new NameFileFilter(single);
        } else if (startsWith != null) {
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.