本文整理汇总了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();
}
}
示例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 );
}
示例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 );
}
示例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;
}
示例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));
}
示例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 );
}
示例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 );
}
示例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 );
}
示例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;
}
示例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));
}
示例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;
}
示例12: SkinManager
import org.apache.commons.io.filefilter.FileFilterUtils; //导入方法依赖的package包/类
public SkinManager(File systemDir, File userDir) {
super(systemDir, userDir, FileFilterUtils.makeSVNAware(DirectoryFileFilter.INSTANCE));
}