File tree Expand file tree Collapse file tree 3 files changed +145
-90
lines changed
core/src/Streamly/Internal/FileSystem Expand file tree Collapse file tree 3 files changed +145
-90
lines changed Original file line number Diff line number Diff line change 119119--
120120
121121#if defined(mingw32_HOST_OS) || defined(__MINGW32__)
122+ -- #define IS_WINDOWS
122123#define OS_PATH WindowsPath
124+ #define FS_WORD Word16
125+ #define FS_CSTRING CWString
123126#else
124127#define OS_PATH PosixPath
128+ #define FS_WORD Word8
129+ #define FS_CSTRING CString
125130#endif
126131
132+ -- #define IS_PORTABLE
133+ -- #include "Streamly/Internal/FileSystem/PosixPath.hs"
134+
127135module Streamly.Internal.FileSystem.Path
128136 (
129137 Path
138+ , FsWord
139+ , FsCString
140+ , asFsCString
130141 , module Streamly.Internal.FileSystem.OS_PATH
131142 )
132143where
133144
145+ import Data.Word (FS_WORD )
146+ import Foreign.C.String (FS_CSTRING )
134147import Streamly.Internal.FileSystem.OS_PATH
135148
136149type Path = OS_PATH
150+ type FsWord = FS_WORD
151+ type FsCString = FS_CSTRING
152+
153+ {-# INLINE asFsCString #-}
154+ asFsCString :: OS_PATH -> (FsCString -> IO a ) -> IO a
155+ #if defined(mingw32_HOST_OS) || defined(__MINGW32__)
156+ asFsCString = asCWString
157+ #else
158+ asFsCString = asCString
159+ #endif
You can’t perform that action at this time.
0 commit comments