sendfile-0.2: A portable sendfile librarySource codeContentsIndex
SendFile
Synopsis
fileSize :: FilePath -> IO Int
sendFile :: Handle -> FilePath -> IO ()
sendFile' :: Handle -> FilePath -> Int -> Int -> IO ()
sendFileMode :: String
Documentation
fileSizeSource
:: FilePathThe path of the file
-> IO IntThe size of the file (in bytes)
Get the size of a file.
sendFileSource
:: HandleThe output Handle
-> FilePathThe path where the input file resides
-> IO ()
A cross-platform wrapper for sendfile -- this implements an available operating-system call if supported, otherwise it falls back to a portable haskell implementation. It will flush the output Handle before handing it to the operating system for transmission.
sendFile'Source
:: HandleThe output Handle
-> FilePathThe path where the input file resides
-> IntThe starting offset of the file (in bytes)
-> IntThe number of bytes to read
-> IO ()
Like sendFile except that it additionally allows you to specify an offset and count. The behavior of reading beyond the end of the file is undefined.
sendFileModeSource
:: StringThe mode that sendfile was compiled with
Returns the mode that sendfile was compiled with. Mainly for debugging use. Possible values are WIN32_SENDFILE, LINUX_SENDFILE, and PORTABLE_SENDFILE.
Produced by Haddock version 2.4.2