boolean isDirectoryEmpty(@NotNull VirtualFile dir) {
    assertThreadIfNeeded();

    return myStrictDirectory2Children.getOrDefault(dir, List.of()).isEmpty();
  }
boolean isDirectoryEmpty(@NotNull VirtualFile dir)