C# Class HYPDM.WinUI.Util.FTPDownUp

文件的FTP上传与FTP下载
Datei anzeigen Open project: huayancreate/HYPDM Class Usage Examples

Public Methods

Method Description
FTPDownUp ( ) : System

构造函数

FTPDownUp ( string serverAdd, int serverPort, string userID, string password ) : System

FTP构造函数

FTPDownload ( string remoteFilePathAndFileName, string localFilePathAndName, string &info ) : bool

FTP文件下载

FTPDownload ( string remoteFilePath, string remoteFileName, string localFilePath, string localFileName, string &info ) : bool

文件下载

FTPUpload ( string remoteFilePath, string remoteFileName, FileInfo fileInfo, string &info ) : bool

FTP上传文件

Private Methods

Method Description
ChkAndSetDir ( string objPath ) : void

如果目录不存在,将创建新目录

DirExist ( string objPath ) : System.Boolean

判定该目录是否存在

Method Details

FTPDownUp() public method

构造函数
public FTPDownUp ( ) : System
return System

FTPDownUp() public method

FTP构造函数
public FTPDownUp ( string serverAdd, int serverPort, string userID, string password ) : System
serverAdd string FTP服务器地址
serverPort int FTP服务器端口号
userID string 登录FTP服务器的账号
password string 登录FTP服务器的账号密码
return System

FTPDownload() public method

FTP文件下载
public FTPDownload ( string remoteFilePathAndFileName, string localFilePathAndName, string &info ) : bool
remoteFilePathAndFileName string 远程需要下载的文件路径及名称
localFilePathAndName string 本地需要下载的文件路径及名称
info string
return bool

FTPDownload() public method

文件下载
public FTPDownload ( string remoteFilePath, string remoteFileName, string localFilePath, string localFileName, string &info ) : bool
remoteFilePath string 远程FTPServer上的路径
remoteFileName string 远程FTPServer杀过的文件名称
localFilePath string 本地目录,以“\”分隔每一级目录。如果为空,下载到当前目录。如果非空,以“\”结尾
localFileName string 本地文件名,如果为空,则与远程文件同名
info string
return bool

FTPUpload() public method

FTP上传文件
public FTPUpload ( string remoteFilePath, string remoteFileName, FileInfo fileInfo, string &info ) : bool
remoteFilePath string 远程目录,以“/”分隔每一级目录。如果非空,以“/”结尾
remoteFileName string 远程文件名,如果为空,则与本地文件同名
fileInfo System.IO.FileInfo
info string
return bool