當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。