private synchronized @NotNull VirtualFilePointerImpl getOrCreate(VirtualFileSystemEntry file,
                                                                   String path,
                                                                   String url,
                                                                   boolean recursive,
                                                                   @NotNull Disposable parentDisposable,
                                                                   @Nullable VirtualFilePointerListener listener,
                                                                   @NotNull NewVirtualFileSystem fs) {
    VirtualFileSystem fsFromFile = file == null ? VirtualFileManager.getInstance().getFileSystem(VirtualFileManager.extractProtocol(url)) : file.getFileSystem();
    assert fs == fsFromFile : "fs=" + fs + "; file.fs=" + fsFromFile+"; url='"+url+"'; file="+file;

    FilePartNodeRoot root = getRoot(fs);
    NodeToUpdate toUpdate;
    if (file == null) {
      String normPath = path;
      if (fs instanceof ArchiveFileSystem) {
        // check that "!/" separator is placed correctly in the url:
        // "xx!/yyy" has jar separator; but "xx/!/yyy" doesn't: directory separator only
        int index = -1;
        do {
          index = path.indexOf(JarFileSystem.JAR_SEPARATOR, index + 1);
        }
        while (index > 0 && path.charAt(index-1) == '/');
        if (index == -1 && !isArchiveInTheWindowsDiskRoot(path)) {
          // treat url "jar://xx/x.jar" as "jar://xx/x.jar!/"
          normPath = path + JarFileSystem.JAR_SEPARATOR;
        }
      }
      toUpdate = root.findOrCreateByPath(normPath, fs);
    }
    else {
      toUpdate = root.findOrCreateByFile(file);
    }
    FilePartNode node = toUpdate.node;
    if (fs != node.myFS) {
      if (url != null && (IS_UNDER_UNIT_TEST || IS_INTERNAL)) {
        throw new IllegalArgumentException("Invalid url: '" + url + "'. " +
                                           "Its protocol '" + VirtualFileManager.extractProtocol(url) + "' is from " + fsFromFile +
                                           " but the path part points to " + node.myFS);
      }
      LOG.error("fs=" + fs + "; node.myFS=" + node.myFS+"; url="+url+"; file="+file+"; node="+node);
    }

    VirtualFilePointerImpl pointer = node.getPointer(listener);
    if (pointer == null) {
      pointer = new VirtualFilePointerImpl(listener);
      node.addLeaf(pointer);
    }
    pointer.incrementUsageCount(1);
    if (!pointer.recursive) {
      pointer.recursive = recursive;
    }

    root.checkConsistency();
    DelegatingDisposable.registerDisposable(parentDisposable, pointer);
    myPointerSetModCount++;
    return pointer;
  }
private synchronized @NotNull VirtualFilePointerImpl getOrCreate(VirtualFileSystemEntry file,
                                                                   String path,
                                                                   String url,
                                                                   boolean recursive,
                                                                   @NotNull Disposable parentDisposable,
                                                                   @Nullable VirtualFilePointerListener listener,
                                                                   @NotNull NewVirtualFileSystem fs)