C# Class Utility.FtpClient

Ftp操作类
FileName: FtpClient.cs CLRVersion: 4.0.30319.18444 Author: Devin DateTime: 2016/1/27 14:42:04 GitHub: https://github.com/v5bep7/Utility
Exibir arquivo Open project: v5bep7/Utility

Public Methods

Method Description
FtpClient ( string ftpServerIp, int timeout, string ftpUserId, string ftpPassword ) : System

创建FtpClient对象

FtpClient ( string ftpServerIp, string ftpUserId, string ftpPassword ) : System

创建FtpClient对象

Upload ( string remotePath, string remoteFileName, Stream stream ) : void

Private Methods

Method Description
Connect ( string uri, string ftpMethod ) : FtpWebRequest

建立FTP链接,返回请求对象

Method Details

FtpClient() public method

创建FtpClient对象
public FtpClient ( string ftpServerIp, int timeout, string ftpUserId, string ftpPassword ) : System
ftpServerIp string ftp链接,不用写协议头.如:127.0.0.1
timeout int 默认的超时时间
ftpUserId string 用户名
ftpPassword string 密码
return System

FtpClient() public method

创建FtpClient对象
public FtpClient ( string ftpServerIp, string ftpUserId, string ftpPassword ) : System
ftpServerIp string ftp链接地址,不用写协议头.如:127.0.0.1
ftpUserId string 用户名
ftpPassword string 密码
return System

Upload() public method

public Upload ( string remotePath, string remoteFileName, Stream stream ) : void
remotePath string
remoteFileName string
stream Stream
return void