def isdir(path):
    """Reproduces the behavior of :func:`os.path.isdir` for HPSS files.

    Parameters
    ----------
    path : :class:`str`
        Path to the file.

    Returns
    -------
    :class:`bool`
        ``True`` if `path` is a directory.
    """
    from ._os import stat
    return stat(path).isdir
