code: @SuppressWarnings("deprecation")
    private boolean isNamespace(Path dir) throws IOException {
      FileStatus[] stats = rootFileSystem.listStatus(dir, PathFilters.notHidden());
      for (FileStatus stat : stats) {
        if (stat.isDir() && isDataset(stat.getPath())) {
          return true;
        }
      }
      return false;
    }
docs: Returns whether the given {@code Path} contains directories with
  {@code Dataset} metadata.
  
  @param dir a Path to check
  @return {@code true} if there is a direct sub-directory with metadata
  @throws IOException