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

System.IO.Cautious

Description

It is recommended to write

import Prelude hiding (writeFile)

when importing this module.

Synopsis

Documentation

writeFile :: FilePath -> String -> IO () Source #

writeFileL :: FilePath -> ByteString -> IO () Source #

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.

writeFileWithBackupL :: IO () -> FilePath -> ByteString -> 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.