MissingH-1.1.1.0: Large utility library

Portability | portable
Stability | provisional
Maintainer | John Goerzen <jgoerzen@complete.org>
Safe Haskell | None

System.IO.WindowsCompat

Description

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.