unix-2.7.1.0: POSIX functionality

Copyright | (c) The University of Glasgow 2002
License | BSD-style (see the file libraries/base/LICENSE)
Maintainer | libraries@haskell.org
Stability | provisional
Portability | non-portable (requires POSIX)
Safe Haskell | Safe
Language | Haskell2010

System.Posix.ByteString.FilePath

Description

Internal stuff: support for ByteString FilePaths

Synopsis

- type RawFilePath = ByteString
- withFilePath :: RawFilePath -> (CString -> IO a) -> IO a
- peekFilePath :: CString -> IO RawFilePath
- peekFilePathLen :: CStringLen -> IO RawFilePath
- throwErrnoPathIfMinus1Retry :: (Eq a, Num a) => String -> RawFilePath -> IO a -> IO a
- throwErrnoPathIfMinus1Retry_ :: (Eq a, Num a) => String -> RawFilePath -> IO a -> IO ()
- throwErrnoPathIfNullRetry :: String -> RawFilePath -> IO (Ptr a) -> IO (Ptr a)
- throwErrnoPathIfRetry :: (a -> Bool) -> String -> RawFilePath -> IO a -> IO a
- throwErrnoPath :: String -> RawFilePath -> IO a
- throwErrnoPathIf :: (a -> Bool) -> String -> RawFilePath -> IO a -> IO a
- throwErrnoPathIf_ :: (a -> Bool) -> String -> RawFilePath -> IO a -> IO ()
- throwErrnoPathIfNull :: String -> RawFilePath -> IO (Ptr a) -> IO (Ptr a)
- throwErrnoPathIfMinus1 :: (Eq a, Num a) => String -> RawFilePath -> IO a -> IO a
- throwErrnoPathIfMinus1_ :: (Eq a, Num a) => String -> RawFilePath -> IO a -> IO ()

# Documentation

type RawFilePath = ByteString

A literal POSIX file path

withFilePath :: RawFilePath -> (CString -> IO a) -> IO a

peekFilePath :: CString -> IO RawFilePath

peekFilePathLen :: CStringLen -> IO RawFilePath

throwErrnoPathIfMinus1Retry :: (Eq a, Num a) => String -> RawFilePath -> IO a -> IO a

throwErrnoPathIfMinus1Retry_ :: (Eq a, Num a) => String -> RawFilePath -> IO a -> IO ()

throwErrnoPathIfNullRetry :: String -> RawFilePath -> IO (Ptr a) -> IO (Ptr a)

throwErrnoPathIfRetry :: (a -> Bool) -> String -> RawFilePath -> IO a -> IO a

throwErrnoPath :: String -> RawFilePath -> IO a

as `throwErrno`, but exceptions include the given path when appropriate.

throwErrnoPathIf :: (a -> Bool) -> String -> RawFilePath -> IO a -> IO a

as `throwErrnoIf`, but exceptions include the given path when appropriate.

throwErrnoPathIf_ :: (a -> Bool) -> String -> RawFilePath -> IO a -> IO ()

as `throwErrnoIf_`, but exceptions include the given path when appropriate.

throwErrnoPathIfNull :: String -> RawFilePath -> IO (Ptr a) -> IO (Ptr a)

as `throwErrnoIfNull`, but exceptions include the given path when appropriate.

throwErrnoPathIfMinus1 :: (Eq a, Num a) => String -> RawFilePath -> IO a -> IO a

as `throwErrnoIfMinus1`, but exceptions include the given path when appropriate.

throwErrnoPathIfMinus1_ :: (Eq a, Num a) => String -> RawFilePath -> IO a -> IO ()

as `throwErrnoIfMinus1_`, but exceptions include the given path when appropriate.