Copyright | Copyright (C) 2005-2011 John Goerzen |
---|---|
License | BSD-3-Clause |
Stability | stable |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Provides some types and related items on Windows to be compatible with the System.Posix.* libraries
See also System.IO.StatCompat, which this module re-exports.
On non-Windows platforms, this module does nothing.
On Windows, it re-exports System.IO.StatCompat. It also provides various file type information modes that are otherwise in System.Posix.Types or System.Posix.Files. It also provides a rudimentary implemention of getFileStatus that emulates the Posix call to stat(2).
Common usage might be like this:
import System.Posix.Types #if (defined(mingw32_HOST_OS) || defined(mingw32_TARGET_OS) || defined(__MINGW32__)) import System.IO.WindowsCompat #else import System.Posix.Files #endif
Or, to avoid having to use CPP and make things even easier, just import System.IO.PlafCompat, which essentially does the above.