zut.files.write_text

zut.files.write_text(path: str | Path, data: str, encoding: str = None, errors: str = None, newline: str = None)

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