Documentation
¶
Overview ¶
Package ftp implements the "ftp" protocol.Protocol driver. It speaks plain FTP and FTPS. The control connection is one command at a time, so a call takes one session from a pool and gives it back. Every transfer also opens a data connection.
The client library sets no deadline after the TCP connect. Each call sets a deadline on the control connection and on each data connection, and a watchdog closes those connections when the budget ends.
Uploads and deletes change files on the server. They need allow_writes, and a fixed path or a delete also needs allow_admin. An account that can only touch a scratch directory is the real lock.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Options = append([]string{ "mode", "path", "size", "fill", "expect_size", "expect_sha256", "expect", "limit", "hidden", "username", "password_env", "tls", "tls_verify", "tls_max", "sessions", "connection", "data_host", "epsv", "allow_writes", "allow_admin", }, tlsconf.Keys...)
Options are the -opt keys this driver accepts.
Functions ¶
This section is empty.
Types ¶
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Driver is an FTP protocol.Protocol.
func NewConn ¶
NewConn is New for a script. password is already known, so password_env is not read. The job of each call is set with Call.
func (*Driver) Call ¶
Call returns a driver for one script call. It shares the pool. Close on it does nothing.