from typing import Any
from typing import cast


def _is_dir_entry(entry: Any) -> bool:
    """Returns true if the html entry refers to a directory."""
    href = entry["href"]
    return cast(bool, (href.endswith("/") and href == entry.string))