Ftp

A FTP client.

The Ftp class is a very simple FTP client that allows you to communicate with a FTP server.

The FTP protocol allows you to manipulate a remote file system (list files, upload, download, create, remove, ...).

Constructors

this
this()

Default Constructor.

Destructor

~this
~this()

Destructor

Members

Classes

DirectoryResponse
class DirectoryResponse

Specialization of FTP response returning a directory.

ListingResponse
class ListingResponse

Specialization of FTP response returning a filename lisiting.

Response
class Response

Define a FTP response.

Enums

TransferMode
enum TransferMode

Enumeration of transfer modes.

Functions

changeDirectory
Response changeDirectory(string directory)

Change the current working directory.

connect
Response connect(IpAddress address, ushort port, Duration timeout)

Connect to the specified FTP server.

connect
Response connect(string address, ushort port, Duration timeout)

Connect to the specified FTP server.

createDirectory
Response createDirectory(string name)

Create a new directory.

deleteDirectory
Response deleteDirectory(string name)

Remove an existing directory.

deleteFile
Response deleteFile(string name)

Remove an existing file.

disconnect
Response disconnect()

Close the connection with the server.

download
Response download(string remoteFile, string localPath, TransferMode mode)

Download a file from the server.

getDirectoryListing
ListingResponse getDirectoryListing(string directory)

Get the contents of the given directory.

getWorkingDirectory
DirectoryResponse getWorkingDirectory()

Get the current working directory.

keepAlive
Response keepAlive()

Send a null command to keep the connection alive.

login
Response login()

Log in using an anonymous account.

login
Response login(string name, string password)

Log in using a username and a password.

parentDirectory
Response parentDirectory()

Go to the parent directory of the current one.

renameFile
Response renameFile(string file, string newName)

Rename an existing file.

upload
Response upload(string localFile, string remotePath, TransferMode mode)

Upload a file to the server.

Variables

sfPtr
sfFtp* sfPtr;
Undocumented in source.

Meta