ftp-client is a client library for the FTP protocol in Haskell.
withFTP "ftp.server.com" 21 $ \h welcome -> do
print welcome
login h "username" "password"
print =<< nlst h []
withFTPS "ftps.server.com" 21 $ \h welcome -> do
print welcome
login h "username" "password"
print =<< nlst h []