Safe Haskell | None |
---|---|
Language | Haskell2010 |
Data.Conduit.SafeWrite
- safeSinkFile :: MonadResource m => FilePath -> Sink ByteString m ()
- atomicConduitUseFile :: MonadResource m => FilePath -> (Handle -> ConduitM i o m a) -> ConduitM i o m a
Documentation
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.
Arguments
:: MonadResource m | |
=> FilePath | Final filename |
-> (Handle -> ConduitM i o m a) | Conduit which uses a Handle |
-> ConduitM i o m a |
Conduit using a Handle in an atomic way