-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Ways to write a file cautiously, to reduce the chances of problems such as data loss due to crashes or power failures
--   
--   On non-Windows systems, posix-specific functions are used to reduce
--   the chance of data loss further
@package cautious-file
@version 1.0.2

module System.Posix.ByteLevel
fdWrite :: Fd -> CStringLen -> IO ByteCount
fdWriteB :: Fd -> ByteString -> IO Int

-- | Write the entire contents of the strict bytestring. Assumes blocking
--   mode.
writeAllB :: Fd -> ByteString -> IO ()

-- | Write the entire contents of the lazy bytestring. Assumes blocking
--   mode.
writeAllL :: Fd -> ByteString -> IO ()

module System.Posix.Fsync
fsync :: Fd -> IO ()


-- | It is recommended to write
--   
--   import Prelude hiding (writeFile)
--   
--   when importing this module.
module System.IO.Cautious
writeFile :: FilePath -> String -> IO ()
writeFileL :: FilePath -> ByteString -> IO ()

-- | Backs up the old version of the file with "backup". "backup" must not
--   fail if there is no old version of the file.
writeFileWithBackup :: IO () -> FilePath -> String -> IO ()

-- | 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 ()
