unix-2.8.4.0: POSIX functionality
Copyright(c) The University of Glasgow 2002
LicenseBSD-style (see the file libraries/base/LICENSE)
Maintainerlibraries@haskell.org
Stabilityprovisional
Portabilitynon-portable (requires POSIX)
Safe HaskellNone
LanguageHaskell2010

System.Posix.PosixString

Description

POSIX.1-2008 support with ByteString file paths and environment strings.

This module exports exactly the same API as System.Posix, except that all file paths and environment strings are represented by ByteString instead of String. The System.Posix API implicitly translates all file paths and environment strings using the locale encoding, whereas this version of the API does no encoding or decoding and works directly in terms of raw bytes.

Note that if you do need to interpret file paths or environment strings as text, then some Unicode encoding or decoding should be applied first.

Synopsis

Documentation

data PosixString Source #

Commonly used Posix string as uninterpreted char[] array.

Instances

Instances details
Monoid PosixString 
Instance details

Defined in System.OsString.Internal.Types.Hidden

Semigroup PosixString 
Instance details

Defined in System.OsString.Internal.Types.Hidden

Generic PosixString 
Instance details

Defined in System.OsString.Internal.Types.Hidden

Associated Types

type Rep PosixString 
Instance details

Defined in System.OsString.Internal.Types.Hidden

type Rep PosixString = D1 ('MetaData "PosixString" "System.OsString.Internal.Types.Hidden" "filepath-1.4.200.1-4fdf" 'True) (C1 ('MetaCons "PosixString" 'PrefixI 'True) (S1 ('MetaSel ('Just "getPosixString") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ShortByteString)))
Show PosixString

Prints the raw bytes without decoding.

Instance details

Defined in System.OsString.Internal.Types.Hidden

NFData PosixString 
Instance details

Defined in System.OsString.Internal.Types.Hidden

Methods

rnf :: PosixString -> ()

Eq PosixString 
Instance details

Defined in System.OsString.Internal.Types.Hidden

Ord PosixString 
Instance details

Defined in System.OsString.Internal.Types.Hidden

Lift PosixString 
Instance details

Defined in System.OsString.Internal.Types.Hidden

Methods

lift :: Quote m => PosixString -> m Exp

liftTyped :: forall (m :: Type -> Type). Quote m => PosixString -> Code m PosixString

type Rep PosixString 
Instance details

Defined in System.OsString.Internal.Types.Hidden

type Rep PosixString = D1 ('MetaData "PosixString" "System.OsString.Internal.Types.Hidden" "filepath-1.4.200.1-4fdf" 'True) (C1 ('MetaCons "PosixString" 'PrefixI 'True) (S1 ('MetaSel ('Just "getPosixString") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ShortByteString)))

type PosixPath = PosixString Source #

Filepaths are char[] data on unix as passed to syscalls.