本文整理汇总了Java中com.intellij.openapi.util.io.FileUtil.pathHashCode方法的典型用法代码示例。如果您正苦于以下问题:Java FileUtil.pathHashCode方法的具体用法?Java FileUtil.pathHashCode怎么用?Java FileUtil.pathHashCode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.openapi.util.io.FileUtil
的用法示例。
在下文中一共展示了FileUtil.pathHashCode方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: removeMapping
import com.intellij.openapi.util.io.FileUtil; //导入方法依赖的package包/类
public void removeMapping(Collection<String> outputPaths, int buildTargetId) throws IOException {
if (outputPaths.isEmpty()) {
return;
}
for (String outputPath : outputPaths) {
final int key = FileUtil.pathHashCode(outputPath);
synchronized (myDataLock) {
final TIntHashSet state = getState(key);
if (state != null) {
final boolean removed = state.remove(buildTargetId);
if (state.isEmpty()) {
remove(key);
}
else {
if (removed) {
update(key, state);
}
}
}
}
}
}
示例2: getSafeToDeleteOutputs
import com.intellij.openapi.util.io.FileUtil; //导入方法依赖的package包/类
public Collection<String> getSafeToDeleteOutputs(Collection<String> outputPaths, int currentTargetId) throws IOException {
final int size = outputPaths.size();
if (size == 0) {
return outputPaths;
}
final Collection<String> result = new ArrayList<String>(size);
for (String outputPath : outputPaths) {
final int key = FileUtil.pathHashCode(outputPath);
synchronized (myDataLock) {
final TIntHashSet associatedTargets = getState(key);
if (associatedTargets == null || associatedTargets.size() != 1) {
continue;
}
if (associatedTargets.contains(currentTargetId)) {
result.add(outputPath);
}
}
}
return result;
}
示例3: fileHashCode
import com.intellij.openapi.util.io.FileUtil; //导入方法依赖的package包/类
public static int fileHashCode(@Nullable File file) {
int hash;
try {
hash = FileUtil.pathHashCode(file == null ? null : file.getCanonicalPath());
}
catch (IOException e) {
LOG.warn("unable to get canonical file path", e);
hash = FileUtil.fileHashCode(file);
}
return hash;
}
示例4: getHashCode
import com.intellij.openapi.util.io.FileUtil; //导入方法依赖的package包/类
@Override
public int getHashCode(String value) {
return FileUtil.pathHashCode(value);
}
示例5: hashCode
import com.intellij.openapi.util.io.FileUtil; //导入方法依赖的package包/类
@Override
public int hashCode() {
return FileUtil.pathHashCode(myPath);
}