本文整理了Java中com.intellij.openapi.util.io.FileUtil.filesEqual()
方法的一些代码示例,展示了FileUtil.filesEqual()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FileUtil.filesEqual()
方法的具体详情如下:
包路径:com.intellij.openapi.util.io.FileUtil
类名称:FileUtil
方法名:filesEqual
暂无
代码示例来源:origin: groboclown/p4ic4idea
private static boolean isRoot(FilePath file, File[] roots) {
if (file == null) {
return true;
}
File f = file.getIOFile();
for (File root : roots) {
if (FileUtil.filesEqual(root, f)) {
return true;
}
}
return false;
}
}
代码示例来源:origin: AlexanderBartash/hybris-integration-intellij-idea-plugin
@NotNull
public static List<String> getPathToParentDirectoryFrom(
@NotNull final File file,
@NotNull final File parentDirectory
) throws IOException {
if (!FileUtils.isFileUnder(file, parentDirectory)) {
throw new IOException("File '" + file + "' is not under '" + parentDirectory + "'");
}
final List<String> path = new ArrayList<>();
File currentDirectory = file.getParentFile();
while (currentDirectory != null && !FileUtil.filesEqual(currentDirectory, parentDirectory)) {
path.add(currentDirectory.getName());
currentDirectory = currentDirectory.getParentFile();
}
final List<String> reversePath = Lists.reverse(path);
LOG.info("Relative path for module dir " + file.getAbsolutePath() + " in " + parentDirectory.getAbsolutePath()
+ " found as " + StringUtils.join(reversePath, '/'));
return reversePath;
}
代码示例来源:origin: groboclown/p4ic4idea
private static boolean filesEqual(boolean aSet, @Nullable File aFile, boolean bSet, @Nullable File bFile) {
return FileUtil.filesEqual(scrubFile(aSet, aFile), scrubFile(bSet, bFile));
}
代码示例来源:origin: AlexanderBartash/hybris-integration-intellij-idea-plugin
if (FileUtil.filesEqual(configHybrisModuleDescriptor.getRootDirectory(), configDir)) {
return configHybrisModuleDescriptor;
代码示例来源:origin: AlexanderBartash/hybris-integration-intellij-idea-plugin
if (hybrisProjectService.isGradleModule(rootProjectDirectory) && !FileUtil.filesEqual(
rootProjectDirectory,
rootDirectory
if (hybrisProjectService.isMavenModule(rootProjectDirectory) && !FileUtil.filesEqual(
rootProjectDirectory,
rootDirectory
LOG.info("Detected platform module " + rootProjectDirectory.getAbsolutePath());
moduleRootMap.get(HYBRIS).add(rootProjectDirectory);
} else if (hybrisProjectService.isEclipseModule(rootProjectDirectory) && !FileUtil.filesEqual(
rootProjectDirectory,
rootDirectory
代码示例来源:origin: Microsoft/azure-devops-intellij
@Override
public boolean value(Project project) {
VirtualFile baseDir = project.getBaseDir();
return baseDir != null && FileUtil.filesEqual(VfsUtilCore.virtualToIoFile(baseDir), directory);
}
});
内容来源于网络,如有侵权,请联系作者删除!