zut.files.write_bytes

zut.files.write_bytes(path: str | PathLike, data, *, mkdir: bool = False, sudo: bool = False) None

Open the file in bytes mode, write to it, and close the file.