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)

Name
Type
Description

server

user

password

SalFtpClient(server, user, password, port)

Name
Type
Description

server

user

password

port

Properties

BinaryMode

Boolean: Returns/Sets binary mode transfer.

Connected

Boolean: Returns true if the connection to the server is established.

Password

String: User password.

Port

Int32: Server port number. The default is 21.

Server

String: Name of the FTP server.

User

String: User name.

Methods

AsyncDownload(fileName, localFileName, resume)

Asynchronous download

Parameter
Type
Description

fileName

localFileName

resume

AsyncUpload(fileName, remoteFileName, resume)

Asynchronous upload

Parameter
Type
Description

fileName

remoteFileName

resume

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: StreamReader.

ConnectDataSocket()

Open a new data socket.

Returns: Socket.

DeleteFile(fileName)

Delete a file from the remote FTP server.

Parameter
Type
Description

fileName

Dispose()

Disposes the FTP client

Download(fileName)

Download a file.

Parameter
Type
Description

fileName

Download(fileName, resume)

Download a file.

Parameter
Type
Description

fileName

resume

Download(fileName, localFileName)

Download a file to a local file name.

Parameter
Type
Description

fileName

localFileName

Download(fileName, localFileName, resume)

Download a file to a local file name.

Parameter
Type
Description

fileName

localFileName

resume

GetCurDir()

Returns the current directory.

Returns: String.

GetFileInfo(mask)

Returns a FileSystemInfo array.

Parameter
Type
Description

mask

Returns: FtpFileInfo[].

GetFileList(mask)

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

Parameter
Type
Description

mask

Returns: String[].

GetFileSize(fileName)

Return the size of a file.

Parameter
Type
Description

fileName

Returns: Int64.

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

oldFileName

newFileName

SendCommand(command, validCodes)

Parameter
Type
Description

command

validCodes

Returns: FtpResponse.

Upload(fileName)

Upload a file.

Parameter
Type
Description

fileName

Upload(fileName, resume)

Upload a file.

Parameter
Type
Description

fileName

resume

Upload(fileName, remoteFileName)

Upload a file.

Parameter
Type
Description

fileName

remoteFileName

Upload(fileName, remoteFileName, resume)

Upload a file.

Parameter
Type
Description

fileName

remoteFileName

resume

Events

StatusUpdate

FtpEventHandler Status event

Last updated