#### 36.4.1 FTP Objects

— Function File: f = ftp (host)
— Function File: f = ftp (host, username, password)

> Connect to the FTP server host with username and password. If username and password are not specified, user "anonymous" with no password is used. The returned FTP object f represents the established FTP connection.

— Function File: mget (f, file)
— Function File: mget (f, dir)
— Function File: mget (..., target)

> Download a remote file file or directory dir to the local directory on the FTP connection f. f is an FTP object returned by the `ftp` function.

> The arguments file and dir can include wildcards and any files or directories on the remote server that match will be downloaded.

> If a third argument target is given, then a single file or directory will be downloaded with the name target to the local directory.

— Function File: mput (f, file)

> Upload the local file file into the current remote directory on the FTP connection f. f is an FTP object returned by the ftp function.

> The argument file is passed by the glob function and any files that match the wildcards in file will be uploaded.

— Function File: ascii (f)

> Put the FTP connection f into ascii mode. f is an FTP object returned by the `ftp` function.

— Function File: binary (f)

> Put the FTP connection f into binary mode. f is an FTP object returned by the `ftp` function.