Copyright | (c) The University of Glasgow 1994-2008 |
---|---|
License | see libraries/base/LICENSE |
Maintainer | libraries@haskell.org |
Stability | internal |
Portability | non-portable |
Safe Haskell | Trustworthy |
Language | Haskell2010 |
Raw read/write operations on file descriptors
Synopsis
- data FD = FD {
- fdFD :: !CInt
- fdIsNonBlocking :: !Int
- openFile :: FilePath -> IOMode -> Bool -> IO (FD, IODeviceType)
- mkFD :: CInt -> IOMode -> Maybe (IODeviceType, CDev, CIno) -> Bool -> Bool -> IO (FD, IODeviceType)
- release :: FD -> IO ()
- setNonBlockingMode :: FD -> Bool -> IO FD
- readRawBufferPtr :: String -> FD -> Ptr Word8 -> Int -> CSize -> IO Int
- readRawBufferPtrNoBlock :: String -> FD -> Ptr Word8 -> Int -> CSize -> IO Int
- writeRawBufferPtr :: String -> FD -> Ptr Word8 -> Int -> CSize -> IO CInt
- stdin :: FD
- stdout :: FD
- stderr :: FD
Documentation
FD | |
|
Instances
Show FD # | Since: base-4.1.0.0 |
IODevice FD # | Since: base-4.1.0.0 |
Defined in GHC.IO.FD ready :: FD -> Bool -> Int -> IO Bool Source # isTerminal :: FD -> IO Bool Source # isSeekable :: FD -> IO Bool Source # seek :: FD -> SeekMode -> Integer -> IO () Source # tell :: FD -> IO Integer Source # getSize :: FD -> IO Integer Source # setSize :: FD -> Integer -> IO () Source # setEcho :: FD -> Bool -> IO () Source # getEcho :: FD -> IO Bool Source # setRaw :: FD -> Bool -> IO () Source # | |
RawIO FD # | Since: base-4.1.0.0 |
BufferedIO FD # | Since: base-4.1.0.0 |
Defined in GHC.IO.FD newBuffer :: FD -> BufferState -> IO (Buffer Word8) Source # fillReadBuffer :: FD -> Buffer Word8 -> IO (Int, Buffer Word8) Source # fillReadBuffer0 :: FD -> Buffer Word8 -> IO (Maybe Int, Buffer Word8) Source # emptyWriteBuffer :: FD -> Buffer Word8 -> IO (Buffer Word8) Source # flushWriteBuffer :: FD -> Buffer Word8 -> IO (Buffer Word8) Source # flushWriteBuffer0 :: FD -> Buffer Word8 -> IO (Int, Buffer Word8) Source # |