iteratee-0.3.1: Iteratee-based I/O

Data.Iteratee.IO.Fd

Contents

Description

Random and Binary IO with generic Iteratees, using File Descriptors for IO. when available, these are the preferred functions for performing IO as they run in constant space and function properly with sockets, pipes, etc.

Synopsis

File enumerators

FileDescriptor based enumerators

enumFd :: forall s el m a. (ReadableChunk s el, MonadIO m) => Fd -> EnumeratorGM s el m aSource

The enumerator of a POSIX File Descriptor. This version enumerates over the entire contents of a file, in order, unless stopped by the iteratee. In particular, seeking is not supported.

enumFdRandom :: forall s el m a. (ReadableChunk s el, MonadIO m) => Fd -> EnumeratorGM s el m aSource

The enumerator of a POSIX File Descriptor: a variation of enumFd that supports RandomIO (seek requests)

Iteratee drivers

fileDriverFd :: (MonadIO m, ReadableChunk s el) => IterateeG s el m a -> FilePath -> m aSource

Process a file using the given IterateeGM. This function wraps enumFd as a convenience.

fileDriverRandomFd :: (MonadIO m, ReadableChunk s el) => IterateeG s el m a -> FilePath -> m aSource

Process a file using the given IterateeGM. This function wraps enumFdRandom as a convenience.