iteratee-0.1.0: Iteratee-based I/O

Data.Iteratee.IO

Contents

Description

Random and Binary IO with generic Iteratees.

Synopsis

File enumerators

Handle-based enumerators

enumHandle :: ReadableChunk s el => Handle -> EnumeratorGM s el IO aSource

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

enumHandleRandom :: ReadableChunk s el => Handle -> EnumeratorGM s el IO aSource

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

FileDescriptor based enumerators

enumFd :: ReadableChunk s el => Fd -> EnumeratorGM s el IO 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 :: ReadableChunk s el => Fd -> EnumeratorGM s el IO aSource

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

Iteratee drivers

fileDriver :: ReadableChunk s el => IterateeGM s el IO a -> FilePath -> IO (Either (String, a) a)Source

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

fileDriverRandom :: ReadableChunk s el => IterateeGM s el IO a -> FilePath -> IO (Either (String, a) a)Source

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