summaryrefslogtreecommitdiff
path: root/src/System
diff options
context:
space:
mode:
Diffstat (limited to 'src/System')
-rw-r--r--src/System/Torrent/Storage.hs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/System/Torrent/Storage.hs b/src/System/Torrent/Storage.hs
index 46ea20f1..c33be89c 100644
--- a/src/System/Torrent/Storage.hs
+++ b/src/System/Torrent/Storage.hs
@@ -29,7 +29,9 @@ module System.Torrent.Storage
29 29
30 -- * TODO expose only File interface! 30 -- * TODO expose only File interface!
31 -- * File interface 31 -- * File interface
32 , FD, openFD, closeFD, readFD, writeFD 32 , FD
33 , openFD, flushFD, closeFD
34 , readFD, writeFD
33 ) where 35 ) where
34 36
35import Control.Applicative 37import Control.Applicative
@@ -244,6 +246,11 @@ openFD path nonblock Storage {..}
244 = return $ Right $ FD bs nonblock 246 = return $ Right $ FD bs nonblock
245 | otherwise = return $ Left $ eNOENT 247 | otherwise = return $ Left $ eNOENT
246 248
249-- | Cancel all enqueued read operations and report any delayed
250-- errors.
251flushFD :: FD -> IO Errno
252flushFD _ = return eOK
253
247-- | This call correspond to close(2). 254-- | This call correspond to close(2).
248closeFD :: FD -> IO () 255closeFD :: FD -> IO ()
249closeFD _ = return () 256closeFD _ = return ()