Hello David,
Friday, September 22, 2006, 1:40:31 PM, you wrote:
> openBinaryFile :: FilePath -> IOMode -> IO Handle
import System.IO
> writeBinaryFile :: FilePath -> String -> IO ()
writeBinaryFile f txt = bracket (openBinaryFile f WriteMode) hClose
(\hdl -> hPutStr hdl txt)
> readBinaryFile :: FilePath -> IO String
readBinaryFile name = openBinaryFile name ReadMode >>= hGetContents
these definitions will work both on unix and win
--
Best regards,
Bulat mailto:[EMAIL PROTECTED]
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe