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


Java IOCase.INSENSITIVE属性代码示例

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


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

示例1: getModels

/**
 * Gets the models.
 *
 * @return the models
 */
public static String[] getModels() {
	File dir = new File(Config.getConfiguration().getString(MODELPATH));

	LOG.info("Loading Models from... " + dir.getAbsolutePath());
	List<String> models = new ArrayList<>();
	String[] modelNames = getModelNames();

	List<String> wildCardPath = Arrays.stream(modelNames).map(model -> {
		return "en-ner-" + model + "*.bin";
	}).collect(Collectors.toList());

	FileFilter fileFilter = new WildcardFileFilter(wildCardPath,
			IOCase.INSENSITIVE);
	List<String> filePath = Arrays.asList(dir.listFiles(fileFilter))
			.stream().map(file -> file.getAbsolutePath())
			.collect(Collectors.toList());
	return filePath.toArray(new String[filePath.size()]);
}
 
开发者ID:TekstoSense,项目名称:opennlp-enhancer,代码行数:23,代码来源:ModelLoaderConfig.java

示例2: findFilesToAnalyze

public static List<String> findFilesToAnalyze(String dirPath) {
	IOFileFilter gitFilter = FileFilterUtils.notFileFilter(
					FileFilterUtils.nameFileFilter(".git")
			);
	File dir = new File(dirPath);
	String[] phpExt = new String[] {"php"};
	IOFileFilter phpFilter = new SuffixFileFilter(phpExt, IOCase.INSENSITIVE);
	List<File> files = (List<File>) FileUtils.listFiles(dir, phpFilter, gitFilter);
	List<String> results = new ArrayList<String>();
	for (File f : files) {
		try {
			results.add(f.getCanonicalPath());
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
	return results;
}
 
开发者ID:wsdookadr,项目名称:mdetect,代码行数:19,代码来源:FileScanUtils.java

示例3: VFSManager

public VFSManager(File systemDir, File userDir) {
    super(systemDir, userDir, new SuffixFileFilter(".xml", IOCase.INSENSITIVE));

    Comparator<File> nameComparator = new Comparator<File>() {
        @Override
        public int compare(File f1, File f2) {
            // we want vfs.xml to loaded first, always.
            if (f1.getName().equals("x-vfs.xml"))
                return Integer.MIN_VALUE;
            if (f2.getName().equals("x-vfs.xml"))
                return Integer.MAX_VALUE;
            return f1.getName().compareToIgnoreCase(f2.getName());
        }
    };

    getSystemFiles().setNameComparator(nameComparator);
}
 
开发者ID:stuckless,项目名称:sagetv-phoenix-core,代码行数:17,代码来源:VFSManager.java

示例4: searchPrefixFile

/**
 * 查找需要合并文件的临时文件信息
 *
 * @param directory       临时文件所在的目录
 * @param prefix          临时文件的前缀
 * @param caseSensitivity 临时文件的大小写敏感
 * @return collection
 */
public static Collection<File> searchPrefixFile(File directory, String prefix, boolean
        caseSensitivity) {
    IOCase iocase = IOCase.INSENSITIVE;
    if (caseSensitivity) {
        iocase = IOCase.SENSITIVE;
    }
    //创建相关的过滤器
    IOFileFilter fileFilter = FileFilterUtils.prefixFileFilter(prefix, iocase);
    //检查相关的过滤信息
    return FileUtils.listFiles(directory, fileFilter, FalseFileFilter.INSTANCE);
}
 
开发者ID:numsg,项目名称:spring-boot-seed,代码行数:19,代码来源:FileOperateUtils.java

示例5: getModsFileFilter

/**
 * Creates a filter that returns everything in the "mods" folder except
 * the specified cubes which are distributed with each new release and
 * any existing themes which are now found in the "themes" folder.
 */
private FileFilter getModsFileFilter() {
    final String[] excludedCubes = new String[]{
        "legacy_cube.txt", "modern_cube.txt", "standard_cube.txt", "extended_cube.txt", "ubeefx_cube.txt"
    };
    final IOFileFilter cubesFilter = new NameFileFilter(excludedCubes, IOCase.INSENSITIVE);
    final IOFileFilter excludeCubes = FileFilterUtils.notFileFilter(cubesFilter);
    final IOFileFilter excludeThemes = FileFilterUtils.notFileFilter(new WildcardFileFilter("*_theme*"));
    return FileFilterUtils.and(excludeCubes, excludeThemes);
}
 
开发者ID:magarena,项目名称:magarena,代码行数:14,代码来源:ImportWorker.java

示例6: MetadataManager

public MetadataManager(File systemDir, File userDir) {
    super(systemDir, userDir, new SuffixFileFilter(".xml", IOCase.INSENSITIVE));

    this.dtd = new File(systemDir, "metadata.dtd");
    dtdResolver = new EntityResolver() {
        public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException {
            return new InputSource(new FileInputStream(dtd));
        }
    };
}
 
开发者ID:stuckless,项目名称:sagetv-phoenix-core,代码行数:10,代码来源:MetadataManager.java

示例7: scanDirectory

private Collection<File> scanDirectory(final File directory) {
	if (!directory.isDirectory()) {
		return Collections.emptyList();
	}
	
	RegexFileFilter regexFileFilter = new RegexFileFilter(PROPERTIES_FILE_PATTERN, IOCase.INSENSITIVE);
	return FileUtils.listFiles(directory, regexFileFilter, FileFilterUtils.trueFileFilter());
}
 
开发者ID:openwide-java,项目名称:localization-properties-consistency-maven-plugin,代码行数:8,代码来源:LocalizationPropertiesConsistencyMojo.java

示例8: getFileNameBasedFilter

protected IOFileFilter getFileNameBasedFilter(String fileNamePattern) {
    if (StringUtils.isNotBlank(fileNamePattern)) {
        return new WildcardFileFilter(fileNamePattern, IOCase.INSENSITIVE);
    }
    return null;
}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:6,代码来源:BatchFileLookupableHelperServiceImpl.java

示例9: OnlineVideosUrlResolverManager

public OnlineVideosUrlResolverManager(File systemDir, File userDir) {
    super(systemDir, userDir, new WildcardFileFilter(new String[]{"*.java", "*.groovy", "*.py"}, IOCase.INSENSITIVE));
}
 
开发者ID:stuckless,项目名称:sagetv-phoenix-core,代码行数:3,代码来源:OnlineVideosUrlResolverManager.java

示例10: FileMatcherManager

public FileMatcherManager(File systemDir, File userDir) {
    super(systemDir, userDir, new SuffixFileFilter("MediaTitles.xml", IOCase.INSENSITIVE));
}
 
开发者ID:stuckless,项目名称:sagetv-phoenix-core,代码行数:3,代码来源:FileMatcherManager.java

示例11: RatingsManager

public RatingsManager(File systemDir, File userDir) throws IOException {
    super(systemDir, userDir, new SuffixFileFilter("ratings.properties", IOCase.INSENSITIVE));
}
 
开发者ID:stuckless,项目名称:sagetv-phoenix-core,代码行数:3,代码来源:RatingsManager.java

示例12: ConfigurationMetadataManager

public ConfigurationMetadataManager(File systemDir, File userDir) {
    super(systemDir, userDir, new SuffixFileFilter(".xml", IOCase.INSENSITIVE));
}
 
开发者ID:stuckless,项目名称:sagetv-phoenix-core,代码行数:3,代码来源:ConfigurationMetadataManager.java

示例13: MenuManager

public MenuManager(File systemDir, File userDir) {
    super(systemDir, userDir, new SuffixFileFilter(".xml", IOCase.INSENSITIVE));
}
 
开发者ID:stuckless,项目名称:sagetv-phoenix-core,代码行数:3,代码来源:MenuManager.java


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