From b2b6e8e2bef7c87f0c8026766eec92aab0ff1e3e Mon Sep 17 00:00:00 2001 From: Sam T Date: Wed, 17 Jul 2013 02:01:39 +0400 Subject: ~ Add stub for flush operation. --- src/System/Torrent/Storage.hs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src') 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 -- * TODO expose only File interface! -- * File interface - , FD, openFD, closeFD, readFD, writeFD + , FD + , openFD, flushFD, closeFD + , readFD, writeFD ) where import Control.Applicative @@ -244,6 +246,11 @@ openFD path nonblock Storage {..} = return $ Right $ FD bs nonblock | otherwise = return $ Left $ eNOENT +-- | Cancel all enqueued read operations and report any delayed +-- errors. +flushFD :: FD -> IO Errno +flushFD _ = return eOK + -- | This call correspond to close(2). closeFD :: FD -> IO () closeFD _ = return () -- cgit v1.2.3