private ChildInfo findExistingChildInfo(@NotNull VirtualFile parent,
                                          @NotNull String childName,
                                          @NotNull List<? extends ChildInfo> children) {
    if (children.isEmpty()) {
      return null;
    }
    // fast path, check that some child has the same `nameId` as a given name - to avoid an overhead on retrieving names of non-cached children
    FSRecordsImpl vfs = vfsPeer;
    int nameId = vfs.getNameId(childName);
    for (ChildInfo info : children) {
      if (nameId == info.getNameId()) {
        return info;
      }
    }
    if (!parent.isCaseSensitive()) {
      for (ChildInfo info : children) {
        if (Comparing.equal(childName, vfs.getNameByNameId(info.getNameId()), false)) {
          return info;
        }
      }
    }
    return null;
  }
private ChildInfo findExistingChildInfo(@NotNull VirtualFile parent,
                                          @NotNull String childName,
                                          @NotNull List<? extends ChildInfo> children)