safeio-0.0.2.0: Write output to disk atomically

Safe HaskellNone
LanguageHaskell2010

Data.Conduit.SafeWrite

Synopsis

Documentation

safeSinkFile Source #

Arguments

:: MonadResource m 
=> FilePath

Final filename

-> Sink ByteString m () 

Write to file |finalname| using a temporary file and atomic move.

The file is only written if the sink runs to completion without errors. Any form of early termination will cause the output to be removed.