from pathlib import Path


def would_overwrite(outdir: Path) -> bool:
    """Walks the directory structure to make sure nothing exists that would be overwritten."""
    if outdir.exists():
        return True
    stick_dir = outdir / "stick_spectra"
    if stick_dir.exists():
        return True
    broadened_dir = outdir / "broadened_spectra"
    if broadened_dir.exists():
        return True
    return False