Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Documentation
Variation of withFile
for output files.
Output is written to a temporary file. Once the action has completed, this file is then sync'ed to disk (see |syncFile|) and renamed to its final destination. In Posix, this is an atomic operation. If an exception is raised, then the temporary output file will be deleted and not saved to disk. Thus, the result file will either contain the complete result or will be empty.