Package org.apache.commons.io.filefilter

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


        @Override
        protected boolean matchesSafely(File directory) {
            return directory.isDirectory() && !FileUtils.listFiles(
                    directory,
                    new NameFileFilter(fileName),
                    TrueFileFilter.INSTANCE
            ).isEmpty();
        }
View Full Code Here


        Assert.assertTrue(index.exists());

        // se copiou os arquivos corretamente
        File html = new File(livro, "includes/");
        Assert.assertTrue(FileUtilities.contentEquals(new File(TubainaBuilder.DEFAULT_TEMPLATE_DIR,
                "html/includes"), html, new NotFileFilter(new NameFileFilter(new String[] { "CVS",
                ".svn" }))));
    }
View Full Code Here

        try {
            File templateIncludes = new File(templateDir, "includes/");
            if (!templateIncludes.exists()) {
                throw new TubainaException("Could not find includes dir at: " + templateIncludes.getAbsolutePath() + ".");
            }
            NotFileFilter excludingVersionControlFiles = new NotFileFilter(new NameFileFilter(Arrays.asList("CVS", ".svn", ".git")));
            FileUtilities.copyDirectoryToDirectory(templateIncludes, bookRoot, excludingVersionControlFiles);
        } catch (IOException e) {
            throw new TubainaException("Error while copying template files", e);
        }
       
View Full Code Here

    try {
      File templateIncludes = new File(templateDir, "includes/");
      if (!templateIncludes.exists()) {
          throw new TubainaException("Could not find includes dir at: " + templateIncludes.getAbsolutePath() + ".");
      }
      NotFileFilter excludingVersionControlFiles = new NotFileFilter(new NameFileFilter(Arrays.asList("CVS", ".svn", ".git")));
      FileUtilities.copyDirectoryToDirectory(templateIncludes, bookRoot, excludingVersionControlFiles);
    } catch (IOException e) {
      throw new TubainaException("Error while copying template files", e);
    }
   
View Full Code Here

TOP

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

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.