Represents a server



Fields

Local

static Server

Represents local file system

Host

string

Server address

Port

int

Server port, default is 21

ProxyServerIndex

int

Index of the proxy server list defined in the Options dialog, 0 represents using the global setting, 1 for no proxy, default is 0

Protocol

ServerProtocol

Server protocol, default is FTP

Username

string

Username, empty for anonymous

Password

string

Password, empty for anonymous

Notes

string

Notes for this server, default is empty

DefaultLocalPath

string

Default local path, default is empty

DefaultRemotePath

string

Default remote path, default is empty

FTPEnryptMode

FTPEnryptMode

For FTP protocol only, default is PlainText

UseHTTPS

bool

For Wing Web protocol only, default is false

OverwriteGlobalFileExistRules

bool

Whether overwrite the global file exist rule, default is false

IncludeGlobalFileFilter

bool

Whether include the global file filters, default is true

TargetExistRules

TargetExistRule[3]

Target exist rules, only valid if OverwriteGlobalFileExistRules is true. 

FileFilters

List<RushFileFilter>

File filter list, default is empty

BookMarks

List<BookMark>

Bookmark list, default is empty

SaveToken

bool

Whether to save the login token, only valid for web browser login server, default is true



Examples


// Create a FTP server with most fields use default values

Server demo_server = new Server { Host = "demo.wftpserver.com", Username = "demo", Password = "demo" };

Site.Connect(demo_server);


// Create Wing Web server and add it to the Site Manager

Server wing_web_server = new Server { Protocol = ServerProtocol.WingWeb, Host = "demo.wftpserver.com", Port = 443, Username = "demo", Password = "demo", UseHTTPS = true ,DefaultRemotePath = "download" };

Site.Add("demo", wing_web_server);


// Create Google Drive server and connect it with second view

Server google_server = new Server { Protocol = ServerProtocol.GoogleDrive};

SecondView.Connect(google_server);



See Also