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


Java FileUtil.pathHashCode方法代码示例

本文整理汇总了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);
          }
        }
      }
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:23,代码来源:OutputToTargetRegistry.java

示例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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:21,代码来源:OutputToTargetRegistry.java

示例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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:ExternalSystemUtil.java

示例4: getHashCode

import com.intellij.openapi.util.io.FileUtil; //导入方法依赖的package包/类
@Override
public int getHashCode(String value) {
  return FileUtil.pathHashCode(value);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:PathStringDescriptor.java

示例5: hashCode

import com.intellij.openapi.util.io.FileUtil; //导入方法依赖的package包/类
@Override
public int hashCode() {
  return FileUtil.pathHashCode(myPath);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:FilePath.java


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