SalFtpClient

PPJ.Runtime.Internet.SalFtpClient

Namespace: PPJ.Runtime.Internet

Assembly: PPJ.Runtime.49 (4.9.0.0)

FTP implementation used to support SalQuickFtp.

public class SalFtpClient : IDisposable

Constructors

SalFtpClient()

SalFtpClient(server, user, password)

SalFtpClient(server, user, password, port)

Properties

BinaryMode

Booleanarrow-up-right: Returns/Sets binary mode transfer.

Connected

Booleanarrow-up-right: Returns true if the connection to the server is established.

Password

Stringarrow-up-right: User password.

Port

Int32arrow-up-right: Server port number. The default is 21.

Server

Stringarrow-up-right: Name of the FTP server.

User

Stringarrow-up-right: User name.

Methods

AsyncDownload(fileName, localFileName, resume)

Asynchronous download

Parameter
Type
Description

AsyncUpload(fileName, remoteFileName, resume)

Asynchronous upload

Parameter
Type
Description

ChangeDir(dir)

Change the current working directory on the remote FTP server.

Parameter
Type
Description

Close()

Close the FTP connection.

Connect()

Connect and login to the remote server.

ConnectDataReader()

Creates a new StreamReader bound to an incoming data socket.

Returns: StreamReaderarrow-up-right.

ConnectDataSocket()

Open a new data socket.

Returns: Socketarrow-up-right.

DeleteFile(fileName)

Delete a file from the remote FTP server.

Parameter
Type
Description

Dispose()

Disposes the FTP client

Download(fileName)

Download a file.

Parameter
Type
Description

Download(fileName, resume)

Download a file.

Parameter
Type
Description

Download(fileName, localFileName)

Download a file to a local file name.

Parameter
Type
Description

Download(fileName, localFileName, resume)

Download a file to a local file name.

Parameter
Type
Description

GetCurDir()

Returns the current directory.

Returns: Stringarrow-up-right.

GetFileInfo(mask)

Returns a FileSystemInfo array.

Parameter
Type
Description

Returns: FtpFileInfo[].

GetFileList(mask)

Return a string array containing the remote directory's file list.

Parameter
Type
Description

Returns: String[]arrow-up-right.

GetFileSize(fileName)

Return the size of a file.

Parameter
Type
Description

Returns: Int64arrow-up-right.

MakeDir(dir)

Create a directory on the remote FTP server.

Parameter
Type
Description

ReadResponse()

Reads the next response code from the connected socket.

Returns: FtpResponse.

RemoveDir(dir)

Delete a directory on the remote FTP server.

Parameter
Type
Description

RenameFile(oldFileName, newFileName)

Rename a file on the remote FTP server.

Parameter
Type
Description

SendCommand(command, validCodes)

Parameter
Type
Description

Returns: FtpResponse.

Upload(fileName)

Upload a file.

Parameter
Type
Description

Upload(fileName, resume)

Upload a file.

Parameter
Type
Description

Upload(fileName, remoteFileName)

Upload a file.

Parameter
Type
Description

Upload(fileName, remoteFileName, resume)

Upload a file.

Parameter
Type
Description

Events

StatusUpdate

FtpEventHandler Status event

Last updated