@Override
  @ApiStatus.Internal
  public ChildInfo findChildInfo(@NotNull VirtualFile parent, @NotNull String childName, @NotNull NewVirtualFileSystem fs) {
    int parentId = getFileId(parent);
    Ref<ChildInfo> foundChildRef = new Ref<>();

    Function<ListResult, ListResult> convertor = children -> {
      ChildInfo child = findExistingChildInfo(parent, childName, children.children);
      if (child != null) {
        foundChildRef.set(child);
        return children;
      }

      //MAYBE RC: why do we access FS on lookup? maybe it is better to look only VFS (i.e. snapshot), and issue
      //          refresh request if children is not loaded -- and rely on automatic refresh to update VFS if
      //          actual FS children are changed?
      //          This way here we'll have read-only scan without concurrent modification problems
      //          I.e. the whole code below is (seems to be) just a 'small local refresh' -- executed during
      //          children lookup, under the VFS lock.
      //          I really want to remove it entirely, and just rely on automatic/explicit refresh
      Pair<@NotNull FileAttributes, String> childData = getChildData(fs, parent, childName, null, null); // todo: use BatchingFileSystem
      if (childData == null) {
        return children;
      }
      //[childData != null]
      // => file DOES exist
      // => We haven't found it yet because either look up the wrong name
      //    or it is the new file, and VFS hasn't received the update yet

      String canonicalName;
      if (parent.isCaseSensitive()) {
        canonicalName = childName;
      }
      else {
        canonicalName = fs.getCanonicallyCasedName(new FakeVirtualFile(parent, childName));
        if (Strings.isEmptyOrSpaces(canonicalName)) {
          return children;
        }

        if (!childName.equals(canonicalName)) {
          child = findExistingChildInfo(parent, canonicalName, children.children);
        }
      }

      if (child == null) {
        child = makeChildRecord(parent, parentId, canonicalName, childData, fs, null);
        foundChildRef.set(child);
        return children.insert(child);
      }
      else {
        foundChildRef.set(child);
        return children;
      }
    };

    vfsPeer.update(parent, parentId, convertor);
    return foundChildRef.get();
  }
@Override
  @ApiStatus.Internal
  public ChildInfo findChildInfo(@NotNull VirtualFile parent, @NotNull String childName, @NotNull NewVirtualFileSystem fs)