ftphs-1.0.7: FTP Client and Server LibrarySource codeContentsIndex
Network.FTP.Client.Parser
Portabilitysystems with networking
Stabilityprovisional
MaintainerJohn Goerzen <jgoerzen@complete.org>
Contents
Utilities
Description

This module provides a parser that is used internally by Network.FTP.Client. You almost certainly do not want to use this module directly. Use Network.FTP.Client instead.

Written by John Goerzen, jgoerzen@complete.org

Synopsis
parseReply :: String -> FTPResult
parseGoodReply :: String -> IO FTPResult
toPortString :: SockAddr -> IO String
fromPortString :: String -> IO SockAddr
debugParseGoodReply :: String -> IO FTPResult
respToSockAddr :: FTPResult -> IO SockAddr
type FTPResult = (Int, [String])
unexpectedresp :: Show a => [Char] -> a -> [Char]
isxresp :: (Ord t, Num t) => t -> (t, t1) -> Bool
forcexresp :: (Ord t, Num t, Show t1) => t -> (t, t1) -> (t, t1)
forceioresp :: Int -> FTPResult -> IO ()
parseDirName :: FTPResult -> Maybe String
Documentation
parseReply :: String -> FTPResultSource
Parse a FTP reply. Returns a (result code, text) pair.
parseGoodReply :: String -> IO FTPResultSource
Parse a FTP reply. Returns a (result code, text) pair. If the result code indicates an error, raise an exception instead of just passing it back.
toPortString :: SockAddr -> IO StringSource

Converts a socket address to a string suitable for a PORT command.

Example:

 toPortString (SockAddrInet (PortNum 0x1234) (0xaabbccdd)) ->
                              "170,187,204,221,18,52"
fromPortString :: String -> IO SockAddrSource
Converts a port string to a socket address. This is the inverse calculation of toPortString.
debugParseGoodReply :: String -> IO FTPResultSource
Parse a FTP reply. Logs debug messages.
respToSockAddr :: FTPResult -> IO SockAddrSource
Converts a response code to a socket address
type FTPResult = (Int, [String])Source
Utilities
unexpectedresp :: Show a => [Char] -> a -> [Char]Source
isxresp :: (Ord t, Num t) => t -> (t, t1) -> BoolSource
forcexresp :: (Ord t, Num t, Show t1) => t -> (t, t1) -> (t, t1)Source
forceioresp :: Int -> FTPResult -> IO ()Source
parseDirName :: FTPResult -> Maybe StringSource
Produced by Haddock version 2.6.0