def cp(
    src: str | Path,
    dest: str | Path,
    overwrite: bool = True,
    ignore: tuple[str, ...] | None = None,
) -> bool:
    """Copy a file or directory.

    Args:
        src: The path to the file or directory.
        dest: The path to the destination.
        overwrite: Whether to overwrite the destination.
        ignore: Ignoring files and directories that match one of the glob-style patterns provided

    Returns:
        Whether the copy was successful.
    """
    src, dest = Path(src), Path(dest)
    if src == dest:
        return False
    if not overwrite and dest.exists():
        return False
    if src.is_dir():
        copy_tree(src, dest, ignore)
    else:
        shutil.copyfile(src, dest)
    return True
Copy a file or directory.

    Args:
        src: The path to the file or directory.
        dest: The path to the destination.
        overwrite: Whether to overwrite the destination.
        ignore: Ignoring files and directories that match one of the glob-style patterns provided

    Returns:
        Whether the copy was successful.
    
reflex/utils/path_ops.py