C# Class HYPDM.WinUI.Util.FTPHelper

FTP帮助类
Afficher le fichier Open project: huayancreate/HYPDM Class Usage Examples

Méthodes publiques

Méthode Description
Delete ( string fileName ) : void

删除文件

Download ( string filePath, string fileName ) : void

下载

DownloadFile ( string filePath, string fileName, string &info ) : bool
FTPHelper ( string FtpServerIP, string FtpRemotePath, string FtpUserID, string FtpPassword ) : System

连接FTP服务器

FileExist ( string RemoteFileName ) : bool

判断当前目录下指定的文件是否存在

GetFileList ( string url ) : string[]

获取当前目录下文件列表(不包括文件夹)

GetFileSize ( string filename ) : long

获取指定文件大小

GetFilesDetailList ( ) : string[]

获取当前目录下明细(包含文件和文件夹)

GotoDirectory ( string DirectoryName, bool IsRoot ) : void

切换当前目录

MakeDir ( string dirName ) : void

创建文件夹

MovieFile ( string currentFilename, string newDirectory ) : void

移动文件

ReName ( string currentFilename, string newFilename ) : void

更改文件名

Upload ( string filename ) : void

上传

UploadFile ( string filename, string &info ) : bool

Private Methods

Méthode Description
GetAllList ( string url ) : string[]

获取FTP文件列表(包括文件夹)

Method Details

Delete() public méthode

删除文件
public Delete ( string fileName ) : void
fileName string
Résultat void

Download() public méthode

下载
public Download ( string filePath, string fileName ) : void
filePath string
fileName string
Résultat void

DownloadFile() public méthode

public DownloadFile ( string filePath, string fileName, string &info ) : bool
filePath string
fileName string
info string
Résultat bool

FTPHelper() public méthode

连接FTP服务器
public FTPHelper ( string FtpServerIP, string FtpRemotePath, string FtpUserID, string FtpPassword ) : System
FtpServerIP string FTP连接地址
FtpRemotePath string 指定FTP连接成功后的当前目录, 如果不指定即默认为根目录
FtpUserID string 用户名
FtpPassword string 密码
Résultat System

FileExist() public méthode

判断当前目录下指定的文件是否存在
public FileExist ( string RemoteFileName ) : bool
RemoteFileName string 远程文件名
Résultat bool

GetFileList() public méthode

获取当前目录下文件列表(不包括文件夹)
public GetFileList ( string url ) : string[]
url string
Résultat string[]

GetFileSize() public méthode

获取指定文件大小
public GetFileSize ( string filename ) : long
filename string
Résultat long

GetFilesDetailList() public méthode

获取当前目录下明细(包含文件和文件夹)
public GetFilesDetailList ( ) : string[]
Résultat string[]

GotoDirectory() public méthode

切换当前目录
public GotoDirectory ( string DirectoryName, bool IsRoot ) : void
DirectoryName string
IsRoot bool true:绝对路径 false:相对路径
Résultat void

MakeDir() public méthode

创建文件夹
public MakeDir ( string dirName ) : void
dirName string
Résultat void

MovieFile() public méthode

移动文件
public MovieFile ( string currentFilename, string newDirectory ) : void
currentFilename string
newDirectory string
Résultat void

ReName() public méthode

更改文件名
public ReName ( string currentFilename, string newFilename ) : void
currentFilename string
newFilename string
Résultat void

Upload() public méthode

上传
public Upload ( string filename ) : void
filename string
Résultat void

UploadFile() public méthode

public UploadFile ( string filename, string &info ) : bool
filename string
info string
Résultat bool