packages feed

ftp-client-conduit 0.4.0.0 → 0.4.0.1

raw patch · 3 files changed

+21/−10 lines, 3 filesdep +conduit-combinatorsdep −conduitPVP: minor bump suggested

API additions: PVP suggests at least a minor version bump

Dependencies added: conduit-combinators

Dependencies removed: conduit

API changes (from Hackage documentation)

+ Network.FTP.Client.Conduit: mlsd :: MonadResource m => Handle -> String -> Producer m MlsdResponse

Files

README.md view
@@ -20,6 +20,6 @@     print welcome     login h "username" "password"     runConduitRes-        $ retrS h filename+        $ retr h filename         .| sinkFile filename ```
ftp-client-conduit.cabal view
@@ -1,5 +1,5 @@ name: ftp-client-conduit-version: 0.4.0.0+version: 0.4.0.1 cabal-version: >=1.10 build-type: Simple license: PublicDomain@@ -24,7 +24,7 @@     build-depends:         base >=4.7 && <5,         ftp-client ==0.4.*,-        conduit >=1.1 && <1.3,+        conduit-combinators ==1.1.*,         bytestring >=0.10.8.1 && <0.11,         resourcet ==1.1.*,         connection >=0.2.7 && <0.3,
src/Network/FTP/Client/Conduit.hs view
@@ -11,9 +11,10 @@     retr,     list,     stor,+    mlsd ) where -import Data.Conduit+import Conduit import Control.Monad.IO.Class import Data.ByteString.Lazy.Internal (defaultChunkSize) import System.IO@@ -30,6 +31,7 @@     , sIOHandleImpl     , tlsHandleImpl     , Security(..)+    , parseMlsdLine     )  import qualified Network.FTP.Client as FTP@@ -117,8 +119,8 @@     debugPrint $ "Recieved: " <> (show resp)     return x -sourceHandle :: MonadIO m => FTP.Handle -> Producer m ByteString-sourceHandle h = loop+sourceFTPHandle :: MonadIO m => FTP.Handle -> Producer m ByteString+sourceFTPHandle h = loop     where         loop = do             bs <- liftIO $ FTP.recv h defaultChunkSize@@ -129,8 +131,8 @@                     yield bs                     loop -sinkHandle :: MonadIO m => FTP.Handle -> Consumer ByteString m ()-sinkHandle h = loop+sinkFTPHandle :: MonadIO m => FTP.Handle -> Consumer ByteString m ()+sinkFTPHandle h = loop     where         loop = do             mbs <- await@@ -146,7 +148,7 @@     -> FTP.Handle     -> Consumer ByteString m () sendType TA h = sendAllLineC h-sendType TI h = sinkHandle h+sendType TI h = sinkFTPHandle h  nlst :: MonadResource m => FTP.Handle -> [String] -> Producer m ByteString nlst ch args =@@ -154,7 +156,7 @@  retr :: MonadResource m => FTP.Handle -> String -> Producer m ByteString retr ch path =-    sourceDataCommandSecurity ch Passive [RType TI, Retr path] sourceHandle+    sourceDataCommandSecurity ch Passive [RType TI, Retr path] sourceFTPHandle  list :: MonadResource m => FTP.Handle -> [String] -> Producer m ByteString list ch args =@@ -164,3 +166,12 @@ stor ch loc rtype =     sourceDataCommandSecurity ch Passive [RType rtype, Stor loc]         $ sendType rtype++mlsd+    :: MonadResource m+    => FTP.Handle+    -> String+    -> Producer m FTP.MlsdResponse+mlsd ch dir =+    sourceDataCommandSecurity ch Passive [RType TA, Mlsd dir] getAllLineRespC+        .| mapC parseMlsdLine