ftp-client: Transfer files with FTP and FTPS

[ library, public-domain, web ] [ Propose Tags ] [ Report a vulnerability ]

ftp-client is a library for communicating with an FTP server. It works over both a clear channel or TLS.


[Skip to Readme]

Modules

[Index] [Quick Jump]

Flags

Manual Flags

NameDescriptionDefault
ci

More strict ghc options used for development and ci, not intended for end-use.

Disabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.0.0, 0.1.0.1, 0.1.0.2, 0.2.0.0, 0.3.0.0, 0.4.0.0, 0.4.0.1, 0.5.0.0, 0.5.0.1, 0.5.1.0, 0.5.1.1, 0.5.1.2, 0.5.1.3, 0.5.1.4, 0.5.1.5, 0.5.1.6, 0.6.0.0
Change log CHANGELOG.md
Dependencies attoparsec (>=0.10 && <0.15), base (>=4.16 && <5), bytestring (>=0.10.8.2 && <0.13), containers (>=0.5.11.0 && <0.8), crypton-connection (>=0.3 && <0.5), data-default-class (>=0.1.2.0 && <0.3), exceptions (>=0.10.3 && <0.11), network (>=2.6.3.6 && <3.3) [details]
Tested with ghc ==9.2.8, ghc ==9.4.8, ghc ==9.6.7, ghc ==9.8.4, ghc ==9.10.3, ghc ==9.12.4
License LicenseRef-PublicDomain
Author Megan Robinson
Maintainer Flipstone Technology Partners
Uploaded by janus at 2026-09-12T19:31:31Z
Category Web
Home page https://github.com/flipstone/ftp-client
Source repo head: git clone https://github.com/flipstone/ftp-client
Distributions LTSHaskell:0.5.1.6, Stackage:0.6.0.0
Reverse Dependencies 2 direct, 1 indirect [details]
Downloads 9272 total (23 in the last 30 days)
Rating 2.25 (votes: 2) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2026-09-12 [all 1 reports]

Readme for ftp-client-0.6.0.0

[back to package description]

FTP Client

ftp-client is a client library for the FTP protocol in Haskell.

Examples

Insecure

withFTP "ftp.server.com" 21 $ \h welcome -> do
    print welcome
    login h "username" "password"
    print =<< nlst h []

Secured with TLS

withFTPS verifies the server's certificate chain and host name, so a server that cannot be validated is refused.

withFTPS "ftps.server.com" 21 $ \h welcome -> do
    print welcome
    login h "username" "password"
    print =<< nlst h []

To talk to a server whose certificate cannot be validated, pass your own settings. Disabling validation leaves the connection encrypted but not authenticated, so anyone on the network path can read the credentials and alter transferred data:

let insecure = def { settingDisableCertificateValidation = True }
withFTPSSettings insecure "ftps.server.com" 21 $ \h welcome ->
    print welcome