atomic-write-0.2.1.1: Atomically write to a file

Copyright | © 2015-2019 Stack Builders Inc.
License | MIT
Maintainer | Stack Builders <hackage@stackbuilders.com>
Stability | experimental
Portability | portable
Safe Haskell | None
Language | Haskell2010

System.AtomicWrite.Writer.ByteString.Binary

Description

Provides functionality to dump the contents of a ByteString to a file open in binary mode

Synopsis

- atomicWriteFile :: FilePath -> ByteString -> IO ()
- atomicWriteFileWithMode :: FileMode -> FilePath -> ByteString -> IO ()

# Documentation

atomicWriteFile Source #

Arguments

:: FilePath | The path where the file will be updated or created
-> ByteString | The content to write to the file
-> IO () |

Creates or modifies a file atomically on POSIX-compliant systems while preserving permissions. The file is opened in binary mode.

atomicWriteFileWithMode Source #

Arguments

:: FileMode |
-> FilePath | The path where the file will be updated or created
-> ByteString | The content to write to the file
-> IO () |

Creates or modifies a file atomically on POSIX-compliant systems and updates permissions. The file is opened in binary mode.