cautious-file-0.1.2: Ways to write a file cautiously, to reduce the chances of problems such as data loss due to crashes or power failures

System.IO.Cautious

Description

It is recommended to write

import Prelude hiding (writeFile)

when importing this module.

Synopsis

Documentation

writeFileWithBackup :: IO () -> FilePath -> String -> IO ()Source

Backs up the old version of the file with backup. backup must not fail if there is no old version of the file.