diff options
Diffstat (limited to 'src/System')
-rw-r--r-- | src/System/Torrent/Storage.hs | 9 |
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 | ||
35 | import Control.Applicative | 37 | import 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. | ||
251 | flushFD :: FD -> IO Errno | ||
252 | flushFD _ = return eOK | ||
253 | |||
247 | -- | This call correspond to close(2). | 254 | -- | This call correspond to close(2). |
248 | closeFD :: FD -> IO () | 255 | closeFD :: FD -> IO () |
249 | closeFD _ = return () | 256 | closeFD _ = return () |