当前位置: 首页>>代码示例>>Java>>正文


Java FileFilterUtils.makeSVNAware方法代码示例

本文整理汇总了Java中org.apache.commons.io.filefilter.FileFilterUtils.makeSVNAware方法的典型用法代码示例。如果您正苦于以下问题:Java FileFilterUtils.makeSVNAware方法的具体用法?Java FileFilterUtils.makeSVNAware怎么用?Java FileFilterUtils.makeSVNAware使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.commons.io.filefilter.FileFilterUtils的用法示例。


在下文中一共展示了FileFilterUtils.makeSVNAware方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: copyNewerDevResources

import org.apache.commons.io.filefilter.FileFilterUtils; //导入方法依赖的package包/类
/**
 * Copy newer files from the standalone dir to the working artifactory home dir
 */
private static void copyNewerDevResources(File devEtcDir, File artHome) throws IOException {
    File homeEtcDir = new File(artHome, "etc");
    IOFileFilter fileFilter = new NewerFileFilter(devEtcDir, homeEtcDir);
    fileFilter = FileFilterUtils.makeSVNAware(fileFilter);
    FileUtils.copyDirectory(devEtcDir, homeEtcDir, fileFilter, true);
    updateDefaultMimetypes(homeEtcDir);
    deleteHaProps(homeEtcDir);
    /**
     * If the bootstrap already exists, it means it's not the first startup, so don't keep the original config file
     * or the etc folder will flood with bootstrap files
     */
    if (new File(homeEtcDir, ArtifactoryHome.ARTIFACTORY_CONFIG_BOOTSTRAP_FILE).exists()) {
        new File(homeEtcDir, ArtifactoryHome.ARTIFACTORY_CONFIG_FILE).delete();
    }
}
 
开发者ID:alancnet,项目名称:artifactory,代码行数:19,代码来源:StartArtifactoryDev.java

示例2: handleJavaStyleComments

import org.apache.commons.io.filefilter.FileFilterUtils; //导入方法依赖的package包/类
public static void handleJavaStyleComments( String baseDir ) throws Exception {
    IOFileFilter sourceFileFilter = FileFilterUtils.orFileFilter(
            FileFilterUtils.suffixFileFilter("java"),
            FileFilterUtils.suffixFileFilter("js") );
    sourceFileFilter = FileFilterUtils.orFileFilter(
            sourceFileFilter,
            FileFilterUtils.suffixFileFilter("css") );
    sourceFileFilter = FileFilterUtils.orFileFilter(
            sourceFileFilter,
            FileFilterUtils.suffixFileFilter("groovy") );
    sourceFileFilter = FileFilterUtils.makeSVNAware(sourceFileFilter);
    sourceFileFilter = FileFilterUtils.makeFileOnly(sourceFileFilter);

    LicensableFileDirectoryWalker dw = new LicensableFileDirectoryWalker(sourceFileFilter, "/*", " * ", " */");
    Collection<String> results = dw.run( baseDir );
    System.out.println( results );
}
 
开发者ID:kuali,项目名称:kfs,代码行数:18,代码来源:LicenseHeaderUpdate.java

示例3: handleXMLStyleComments

import org.apache.commons.io.filefilter.FileFilterUtils; //导入方法依赖的package包/类
public static void handleXMLStyleComments( String baseDir ) throws Exception {
    IOFileFilter sourceFileFilter = FileFilterUtils.orFileFilter(
            FileFilterUtils.suffixFileFilter("xml"),
            FileFilterUtils.suffixFileFilter("jrxml") );
    sourceFileFilter = FileFilterUtils.orFileFilter(
            sourceFileFilter,
            FileFilterUtils.suffixFileFilter("html") );
    sourceFileFilter = FileFilterUtils.orFileFilter(
            sourceFileFilter,
            FileFilterUtils.suffixFileFilter("htm") );
    sourceFileFilter = FileFilterUtils.orFileFilter(
            sourceFileFilter,
            FileFilterUtils.suffixFileFilter("xsd") );
    sourceFileFilter = FileFilterUtils.orFileFilter(
            sourceFileFilter,
            FileFilterUtils.suffixFileFilter("tld") );
    sourceFileFilter = FileFilterUtils.makeSVNAware(sourceFileFilter);
    sourceFileFilter = FileFilterUtils.makeFileOnly(sourceFileFilter);

    LicensableFileDirectoryWalker dw = new LicensableFileDirectoryWalker(sourceFileFilter, "<!--", "   - ", " -->");
    Collection<String> results = dw.run( baseDir );
    System.out.println( results );
}
 
开发者ID:kuali,项目名称:kfs,代码行数:24,代码来源:LicenseHeaderUpdate.java

示例4: listFolders

import org.apache.commons.io.filefilter.FileFilterUtils; //导入方法依赖的package包/类
/**
 * Recurse in the folder to get the list all files and folders of all non svn files
 *
 * @param folder the folder to parse
 */
@SuppressWarnings("unchecked")
public Collection<String> listFolders(File folder) {
    IOFileFilter ioFileFilter = FileFilterUtils.makeSVNAware(FileFilterUtils.makeCVSAware(FileFilterUtils.trueFileFilter()));
    Collection<File> files = FileUtils.listFiles(folder, FileFilterUtils.fileFileFilter(), ioFileFilter);
    Set<String> ret = newTreeSet();
    for (File file : files) {
        ret.add(file.getParentFile().getAbsolutePath());
    }
    return ret;
}
 
开发者ID:jaxio,项目名称:celerio,代码行数:16,代码来源:IOUtil.java

示例5: getFilesFromDirectory

import org.apache.commons.io.filefilter.FileFilterUtils; //导入方法依赖的package包/类
public static List<File> getFilesFromDirectory(File directory) {
  IOFileFilter fileFilter = FileFilterUtils.makeSVNAware(HiddenFileFilter.VISIBLE);
  IOFileFilter dirFilter = FileFilterUtils.makeSVNAware(FileFilterUtils.and(
      FileFilterUtils.directoryFileFilter(),
      HiddenFileFilter.VISIBLE));
  return new ArrayList<File>(FileUtils.listFiles(directory, fileFilter, dirFilter));
}
 
开发者ID:ClearTK,项目名称:cleartk,代码行数:8,代码来源:DocumentClassificationEvaluation.java

示例6: handleJSPStyleComments

import org.apache.commons.io.filefilter.FileFilterUtils; //导入方法依赖的package包/类
public static void handleJSPStyleComments( String baseDir ) throws Exception {
    IOFileFilter sourceFileFilter = FileFilterUtils.orFileFilter(
            FileFilterUtils.suffixFileFilter("jsp"),
            FileFilterUtils.suffixFileFilter("tag") );
    sourceFileFilter = FileFilterUtils.orFileFilter(
            sourceFileFilter,
            FileFilterUtils.suffixFileFilter("inc") );
    sourceFileFilter = FileFilterUtils.makeSVNAware(sourceFileFilter);
    sourceFileFilter = FileFilterUtils.makeFileOnly(sourceFileFilter);

    LicensableFileDirectoryWalker dw = new LicensableFileDirectoryWalker(sourceFileFilter, "<%--", "   - ", "--%>");
    Collection<String> results = dw.run( baseDir );
    System.out.println( results );
}
 
开发者ID:kuali,项目名称:kfs,代码行数:15,代码来源:LicenseHeaderUpdate.java

示例7: handlePropertyStyleComments

import org.apache.commons.io.filefilter.FileFilterUtils; //导入方法依赖的package包/类
public static void handlePropertyStyleComments( String baseDir ) throws Exception {
    IOFileFilter sourceFileFilter = FileFilterUtils.orFileFilter(
            FileFilterUtils.suffixFileFilter("properties"),
            FileFilterUtils.suffixFileFilter("cmd") );
    sourceFileFilter = FileFilterUtils.orFileFilter(
            sourceFileFilter,
            FileFilterUtils.suffixFileFilter("sh") );
    sourceFileFilter = FileFilterUtils.makeSVNAware(sourceFileFilter);
    sourceFileFilter = FileFilterUtils.makeFileOnly(sourceFileFilter);

    LicensableFileDirectoryWalker dw = new LicensableFileDirectoryWalker(sourceFileFilter, "########################################", "# ", "########################################");
    Collection<String> results = dw.run( baseDir );
    System.out.println( results );
}
 
开发者ID:kuali,项目名称:kfs,代码行数:15,代码来源:LicenseHeaderUpdate.java

示例8: handleSQLStyleComments

import org.apache.commons.io.filefilter.FileFilterUtils; //导入方法依赖的package包/类
public static void handleSQLStyleComments( String baseDir ) throws Exception {
    IOFileFilter sourceFileFilter = FileFilterUtils.suffixFileFilter("sql");
    sourceFileFilter = FileFilterUtils.makeSVNAware(sourceFileFilter);
    sourceFileFilter = FileFilterUtils.makeFileOnly(sourceFileFilter);

    LicensableFileDirectoryWalker dw = new LicensableFileDirectoryWalker(sourceFileFilter, "--", "-- ", LINE_SEPARATOR);
    Collection<String> results = dw.run( baseDir );
    System.out.println( results );
}
 
开发者ID:kuali,项目名称:kfs,代码行数:10,代码来源:LicenseHeaderUpdate.java

示例9: getFolders

import org.apache.commons.io.filefilter.FileFilterUtils; //导入方法依赖的package包/类
public List<String> getFolders()
    throws MojoExecutionException
{
    IOFileFilter folders = FileFilterUtils.and( HiddenFileFilter.VISIBLE, DirectoryFileFilter.DIRECTORY );
    IOFileFilter makeSVNAware = FileFilterUtils.makeSVNAware( folders );
    IOFileFilter makeCVSAware = FileFilterUtils.makeCVSAware( makeSVNAware );

    String[] list = folder.list( makeCVSAware );
    if ( list == null )
    {
        throw new MojoExecutionException( "The specified folder doesn't exist: " + folder );
    }

    List<File> listOfDirectories = new ArrayList<File>();
    for ( String item : list )
    {
        listOfDirectories.add( new File( folder, item ) );
    }

    Collections.sort( listOfDirectories, convertSortOrder() );
    List<String> resultList = new ArrayList<String>();
    for ( File file : listOfDirectories )
    {
        resultList.add( file.getName() );
    }
    return resultList;
}
 
开发者ID:khmarbaise,项目名称:iterator-maven-plugin,代码行数:28,代码来源:AbstractIteratorMojo.java

示例10: getFilesFromDirectory

import org.apache.commons.io.filefilter.FileFilterUtils; //导入方法依赖的package包/类
public static List<File> getFilesFromDirectory(File directory) {
  IOFileFilter fileFilter = FileFilterUtils.makeSVNAware(HiddenFileFilter.VISIBLE);
  IOFileFilter dirFilter = FileFilterUtils
      .makeSVNAware(FileFilterUtils.and(FileFilterUtils.directoryFileFilter(), HiddenFileFilter.VISIBLE));
  return new ArrayList<File>(FileUtils.listFiles(directory, fileFilter, dirFilter));
}
 
开发者ID:utk4rsh,项目名称:question-classifier,代码行数:7,代码来源:QuestionCategoryEvaluation.java

示例11: updateArtEtc

import org.apache.commons.io.filefilter.FileFilterUtils; //导入方法依赖的package包/类
static File updateArtEtc(File devEtcDir, File artEtc) throws IOException {
    IOFileFilter fileFilter = new NewerFileFilter(devEtcDir, artEtc);
    fileFilter = FileFilterUtils.makeSVNAware(fileFilter);
    FileUtils.copyDirectory(devEtcDir, artEtc, fileFilter, true);
    return artEtc;
}
 
开发者ID:alancnet,项目名称:artifactory,代码行数:7,代码来源:StartArtifactoryTomcatDev.java

示例12: SkinManager

import org.apache.commons.io.filefilter.FileFilterUtils; //导入方法依赖的package包/类
public SkinManager(File systemDir, File userDir) {
    super(systemDir, userDir, FileFilterUtils.makeSVNAware(DirectoryFileFilter.INSTANCE));
}
 
开发者ID:stuckless,项目名称:sagetv-phoenix-core,代码行数:4,代码来源:SkinManager.java


注:本文中的org.apache.commons.io.filefilter.FileFilterUtils.makeSVNAware方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。