Copyright | © 2015-2019 Stack Builders Inc. |
---|---|
License | MIT |
Maintainer | Stack Builders <hackage@stackbuilders.com> |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell2010 |
Provides functionality to dump the contents of a String to a file in binary mode.
Synopsis
- atomicWriteFile :: FilePath -> String -> IO ()
- atomicWithFile :: FilePath -> (Handle -> IO ()) -> IO ()
- atomicWriteFileWithMode :: FileMode -> FilePath -> String -> IO ()
- atomicWithFileAndMode :: FileMode -> FilePath -> (Handle -> IO ()) -> IO ()
Documentation
:: FilePath | The path where the file will be updated or created |
-> String | The content to write to the file |
-> IO () |
Creates or modifies a file atomically on POSIX-compliant systems while preserving permissions.
atomicWithFile :: FilePath -> (Handle -> IO ()) -> IO () Source #
A general version of atomicWriteFile
atomicWriteFileWithMode Source #
:: FileMode | The mode to set the file to |
-> FilePath | The path where the file will be updated or created |
-> String | The content to write to the file |
-> IO () |
Creates or modifies a file atomically on POSIX-compliant systems and updates permissions
atomicWithFileAndMode :: FileMode -> FilePath -> (Handle -> IO ()) -> IO () Source #
A general version of atomicWriteFileWithMode