public boolean belongsTo(@NotNull FilePath filePath) {
    String path = filePath.getPath();
    int startIndex = getParentPrefixOf(myRoot, path, myCaseSensitive);
    if (startIndex == -1) {
      return false;
    }

    if (myEverythingDirty) {
      return true;
    }
    if (path.length() == myRoot.length()) {
      return false; // myEverythingDirty == false
    }

    int index = startIndex;
    int lastPrefixHash = 0;

    while (index < path.length()) {
      int nextIndex = path.indexOf('/', index + 1);
      if (nextIndex == -1) nextIndex = path.length();

      int prefixHash = FilePathHashUtil.pathHashCode(myCaseSensitive, path, index, nextIndex, lastPrefixHash);

      if (myPathHashSet.contains(prefixHash)) {
        String prefix = path.substring(startIndex, nextIndex);
        if (myPaths.contains(prefix)) return true;
      }

      index = nextIndex;
      lastPrefixHash = prefixHash;
    }

    return false;
  }
public boolean belongsTo(@NotNull FilePath filePath)