writeFile package:system-fileio

Replace the entire content of a binary file with the provided ByteString. This computation throws IOError on failure. See “Classifying I/O errors” in the System.IO.Error documentation for information on why the failure occured.