Open y30n9ju1v opened 7 months ago
ghci> :t withBinaryFile withBinaryFile :: FilePath -> System.IO.IOMode -> (Handle -> IO r) -> IO r
-- TODO: implement as for POSIX withFile :: FilePath -> IOMode -> (Handle -> IO r) -> IO r withFile = POSIX.withFile <!> wf where wf path mode act = bracket (Win.openFile path mode) hClose_impl act
openBinaryFile :: FilePath -> IOMode -> IO Handle openBinaryFile = POSIX.openBinaryFile <!> Win.openBinaryFile
withBinaryFile :: FilePath -> IOMode -> (Handle -> IO r) -> IO r withBinaryFile = POSIX.withBinaryFile <!> wf where wf path mode act = bracket (Win.openBinaryFile path mode) hClose_impl act
그리고 바이너리를 쓰려면요?