more OsPath conversion
Finally reached Annex code in this conversion. Sponsored-by: Graham Spencer
This commit is contained in:
parent
51a6cd1ee6
commit
f9d42c37c0
9 changed files with 64 additions and 37 deletions
|
@ -16,6 +16,7 @@ module Utility.FileIO
|
|||
(
|
||||
withFile,
|
||||
openFile,
|
||||
openBinaryFile,
|
||||
readFile,
|
||||
readFile',
|
||||
writeFile,
|
||||
|
@ -51,6 +52,11 @@ openFile f m = do
|
|||
f' <- toOsPath <$> convertToWindowsNativeNamespace (fromOsPath f)
|
||||
O.openFile f' m
|
||||
|
||||
openBinaryFile :: OsPath -> IOMode -> IO Handle
|
||||
openBinaryFile f m = do
|
||||
f' <- toOsPath <$> convertToWindowsNativeNamespace (fromOsPath f)
|
||||
O.openBinaryFile f' m
|
||||
|
||||
readFile :: OsPath -> IO L.ByteString
|
||||
readFile f = do
|
||||
f' <- toOsPath <$> convertToWindowsNativeNamespace (fromOsPath f)
|
||||
|
@ -104,6 +110,9 @@ withFile = System.IO.withFile . fromRawFilePath
|
|||
openFile :: OsPath -> IOMode -> IO Handle
|
||||
openFile = System.IO.openFile . fromRawFilePath
|
||||
|
||||
openBinaryFile :: OsPath -> IOMode -> IO Handle
|
||||
openBinaryFile = System.IO.openBinaryFile . fromRawFilePath
|
||||
|
||||
readFile :: OsPath -> IO L.ByteString
|
||||
readFile = L.readFile . fromRawFilePath
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue