Ftp

An FTP client.

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(const(char)[] directory)

Change the current working directory.

connect
Response connect(IpAddress address, ushort port = 21, Duration timeout = Duration.zero())

Connect to the specified FTP server.

connect
Response connect(const(char)[] address, ushort port = 21, Duration timeout = Duration.zero())

Connect to the specified FTP server.

createDirectory
Response createDirectory(const(char)[] name)

Create a new directory.

deleteDirectory
Response deleteDirectory(const(char)[] name)

Remove an existing directory.

deleteFile
Response deleteFile(const(char)[] name)

Remove an existing file.

disconnect
Response disconnect()

Close the connection with the server.

download
Response download(const(char)[] remoteFile, const(char)[] localPath, TransferMode mode = TransferMode.Binary)

Download a file from the server.

getDirectoryListing
ListingResponse getDirectoryListing(const(char)[] 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(const(char)[] name, const(char)[] password)

Log in using a username and a password.

parentDirectory
Response parentDirectory()

Go to the parent directory of the current one.

renameFile
Response renameFile(const(char)[] file, const(char)[] newName)

Rename an existing file.

sendCommand
Response sendCommand(const(char)[] command, const(char)[] parameter)

Send a command to the FTP server.

upload
Response upload(const(char)[] localFile, const(char)[] remotePath, TransferMode mode = TransferMode.Binary)

Upload a file to the server.

Meta