from pathlib import Path
import filecmp


def are_dirs_equal(dir1: Path, dir2: Path) -> bool:
    """Compare the content of two directories, recursively."""
    comparison = filecmp.dircmp(str(dir1), str(dir2))
    return comparison.diff_files == []