Skip to content
Snippets Groups Projects
Commit 34c7bf89 authored by Simon Marlow's avatar Simon Marlow
Browse files

Provide a raw ByteString version of FilePath and environment APIs

The new module System.Posix.ByteString provides exactly the same API
as System.Posix, except that:

  - There is a new type: RawFilePath = ByteString

  - All functions mentioning FilePath in the System.Posix API
    use RawFilePath in the System.Posix.ByteString API

  - RawFilePaths are not subject to Unicode locale encoding and
    decoding, unlike FilePaths.  They are the exact bytes passed to and
    returned from the underlying POSIX API.

  - Similarly for functions that deal in environment
    strings (System.Posix.Env): these use untranslated ByteStrings
    in System.Posix.Environment

  - There is a new function

     System.Posix.ByteString.getArgs :: [ByteString]

    returning the raw untranslated arguments as passed to exec() when
    the program was started.
parent c213ae2e
No related branches found
No related tags found
Loading
Showing
with 2226 additions and 1147 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment