def chmod_rm(path: Path):
    """Remove a file or directory with chmod.

    Args:
        path: The path to the file or directory.
    """
    path.chmod(stat.S_IWRITE)
    if path.is_dir():
        shutil.rmtree(path)
    elif path.is_file():
        path.unlink()
Remove a file or directory with chmod.

    Args:
        path: The path to the file or directory.
    
reflex/utils/path_ops.py