zut.write_text

zut.write_text(path: str | PathLike, data: str, *, encoding: str | None = None, errors: str | None = None, newline: str | None = None, sudo=False)

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