module Data.Iteratee.IO(
enumHandle,
enumHandleRandom,
#if defined(USE_POSIX)
enumFd,
enumFdRandom,
#endif
fileDriver,
fileDriverVBuf,
fileDriverRandom,
fileDriverRandomVBuf,
)
where
import Data.Iteratee.Base.ReadableChunk
import Data.Iteratee.Iteratee
import Data.Iteratee.Binary()
import Data.Iteratee.IO.Handle
#if defined(USE_POSIX)
import Data.Iteratee.IO.Fd
#endif
import Control.Monad.CatchIO
defaultBufSize :: Int
defaultBufSize = 1024
#if defined(USE_POSIX)
fileDriver
:: (MonadCatchIO m, NullPoint s, ReadableChunk s el) =>
Iteratee s m a
-> FilePath
-> m a
fileDriver = fileDriverFd defaultBufSize
fileDriverVBuf
:: (MonadCatchIO m, NullPoint s, ReadableChunk s el) =>
Int
-> Iteratee s m a
-> FilePath
-> m a
fileDriverVBuf = fileDriverFd
fileDriverRandom
:: (MonadCatchIO m, NullPoint s, ReadableChunk s el) =>
Iteratee s m a
-> FilePath
-> m a
fileDriverRandom = fileDriverRandomFd defaultBufSize
fileDriverRandomVBuf
:: (MonadCatchIO m, NullPoint s, ReadableChunk s el) =>
Int
-> Iteratee s m a
-> FilePath
-> m a
fileDriverRandomVBuf = fileDriverRandomFd
#else
fileDriver ::
(MonadCatchIO m, NullPoint s, ReadableChunk s el) =>
Iteratee s m a
-> FilePath
-> m a
fileDriver = fileDriverHandle defaultBufSize
fileDriverVBuf ::
(MonadCatchIO m, NullPoint s, ReadableChunk s el) =>
Int
-> Iteratee s m a
-> FilePath
-> m a
fileDriverVBuf = fileDriverHandle
fileDriverRandom
:: (MonadCatchIO m, NullPoint s, ReadableChunk s el) =>
Iteratee s m a
-> FilePath
-> m a
fileDriverRandom = fileDriverRandomHandle defaultBufSize
fileDriverRandomVBuf
:: (MonadCatchIO m, NullPoint s, ReadableChunk s el) =>
Int
-> Iteratee s m a
-> FilePath
-> m a
fileDriverRandomVBuf = fileDriverRandomHandle
#endif