streamly-0.8.0: Dataflow programming and declarative concurrency
Copyright(c) 2019 Composewell Technologies
LicenseBSD3
Maintainerstreamly@composewell.com
Stabilityexperimental
PortabilityGHC
Safe HaskellNone
LanguageHaskell2010

Streamly.Internal.FileSystem.FDIO

Description

Low level IO routines interfacing the operating system.

Synopsis

Documentation

write :: FD -> Ptr Word8 -> Int -> CSize -> IO CInt Source #

write FD buffer offset length tries to write data on the given filesystem fd (cannot be a socket) up to sepcified length starting from the given offset in the buffer. The write will not block the OS thread, it may suspend the Haskell thread until write can proceed. Returns the actual amount of data written.

writeAll :: FD -> Ptr Word8 -> Int -> IO () Source #

Keep writing in a loop until all data in the buffer has been written.

data IOVec Source #

Constructors

IOVec 

Fields

Instances

Instances details
Eq IOVec Source # 
Instance details

Defined in Streamly.Internal.FileSystem.IOVec

Methods

(==) :: IOVec -> IOVec -> Bool #

(/=) :: IOVec -> IOVec -> Bool #

Show IOVec Source # 
Instance details

Defined in Streamly.Internal.FileSystem.IOVec

Methods

showsPrec :: Int -> IOVec -> ShowS #

show :: IOVec -> String #

showList :: [IOVec] -> ShowS #

Storable IOVec Source # 
Instance details

Defined in Streamly.Internal.FileSystem.IOVec

Methods

sizeOf :: IOVec -> Int #

alignment :: IOVec -> Int #

peekElemOff :: Ptr IOVec -> Int -> IO IOVec #

pokeElemOff :: Ptr IOVec -> Int -> IOVec -> IO () #

peekByteOff :: Ptr b -> Int -> IO IOVec #

pokeByteOff :: Ptr b -> Int -> IOVec -> IO () #

peek :: Ptr IOVec -> IO IOVec #

poke :: Ptr IOVec -> IOVec -> IO () #

writev :: FD -> Ptr IOVec -> Int -> IO CInt Source #

write FD iovec count tries to write data on the given filesystem fd (cannot be a socket) from an iovec with specified number of entries. The write will not block the OS thread, it may suspend the Haskell thread until write can proceed. Returns the actual amount of data written.

writevAll :: FD -> Ptr IOVec -> Int -> IO () Source #

Keep writing an iovec in a loop until all the iovec entries are written.