diff options
author | Sam T <pxqr.sta@gmail.com> | 2013-07-17 02:01:39 +0400 |
---|---|---|
committer | Sam T <pxqr.sta@gmail.com> | 2013-07-17 02:01:39 +0400 |
commit | b2b6e8e2bef7c87f0c8026766eec92aab0ff1e3e (patch) | |
tree | dcb2d2760df1e94c11513a88725f85c65d0863b4 /src/System | |
parent | 33ae6235029ad9d2a9b5726afff13b660783b86a (diff) |
~ Add stub for flush operation.
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 () |