def get_last_change(path):
    """
    Figure out when the given path has last changed, recursively if a directory
    """
    last_changed = path.stat().st_mtime

    if path.is_dir():
        for entry in path.glob("**/*"):
            entry_changed = entry.stat().st_mtime
            if entry_changed > last_changed:
                last_changed = entry_changed

    return last_changed