private @NotNull FSDir convertDirectory(@NotNull VirtualFile dir) throws IOException {
    FSItem fsItem = convertAndCheck(dir);
    if (!fsItem.isDirectory()) {
      throw new IOException("Not a directory: " + dir.getPath());
    }
    return (FSDir)fsItem;
  }
private @NotNull FSDir convertDirectory(@NotNull VirtualFile dir)