@Contract("_, _, true, _ -> !null")
  FilePartNode findChildByNameId(@Nullable VirtualFile file,
                                 int nameId,
                                 boolean createIfNotFound,
                                 @NotNull NewVirtualFileSystem childFs) {
    if (nameId <= 0 && nameId != JAR_SEPARATOR_NAME_ID) throw new IllegalArgumentException("invalid argument nameId: "+nameId);
    for (FilePartNode child : children) {
      if (child.nameEqualTo(nameId)) return child;
    }
    if (createIfNotFound) {
      CharSequence name = fromNameId(nameId);
      int index = children.length == 0 ? -1 : binarySearchChildByName(name);
      FilePartNode child;
      if (index >= 0) throw new AssertionError(index + " : child= '" + (child = children[index]) + "'"
                         + "; child.nameEqualTo(nameId)=" + child.nameEqualTo(nameId)
                         + "; child.getClass()=" + child.getClass()
                         + "; child.nameId=" + child.nameId
                         + "; child.getName()='" + child.getName() + "'"
                         + "; nameId=" + nameId
                         + "; name='" + name + "'"
                         + "; compare(child) = " + StringUtil.compare(child.getName(), name, !isCaseSensitive()) + ";"
                         + " UrlPart.nameEquals: " + StringUtilRt.equal(child.getName(), fromNameId(nameId), SystemInfoRt.isFileSystemCaseSensitive)
                                                                                               + "; name.equals(child.getName())=" + child.getName().equals(name)
                                                                                               + "; file=" + file
                                                                                               + "; this.isCaseSensitive()=" + isCaseSensitive());
      Object fileOrUrl = file;
      if (fileOrUrl == null) {
        fileOrUrl = this.nameId == -1 ? name.toString() : childUrl(myUrl(), name, childFs);
      }
      child = new FilePartNode(nameId, fileOrUrl, childFs);
      children = ArrayUtil.insert(children, -index-1, child);
      return child;
    }
    return null;
  }
@Contract("_, _, true, _ -> !null")
  FilePartNode findChildByNameId(@Nullable VirtualFile file,
                                 int nameId,
                                 boolean createIfNotFound,
                                 @NotNull NewVirtualFileSystem childFs)