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