C# 클래스 HYPDM.WinUI.Util.FTPHelper

FTP帮助类
파일 보기 프로젝트 열기: huayancreate/HYPDM 1 사용 예제들

공개 메소드들

메소드 설명
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

비공개 메소드들

메소드 설명
GetAllList ( string url ) : string[]

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

메소드 상세

Delete() 공개 메소드

删除文件
public Delete ( string fileName ) : void
fileName string
리턴 void

Download() 공개 메소드

下载
public Download ( string filePath, string fileName ) : void
filePath string
fileName string
리턴 void

DownloadFile() 공개 메소드

public DownloadFile ( string filePath, string fileName, string &info ) : bool
filePath string
fileName string
info string
리턴 bool

FTPHelper() 공개 메소드

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

FileExist() 공개 메소드

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

GetFileList() 공개 메소드

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

GetFileSize() 공개 메소드

获取指定文件大小
public GetFileSize ( string filename ) : long
filename string
리턴 long

GetFilesDetailList() 공개 메소드

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

GotoDirectory() 공개 메소드

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

MakeDir() 공개 메소드

创建文件夹
public MakeDir ( string dirName ) : void
dirName string
리턴 void

MovieFile() 공개 메소드

移动文件
public MovieFile ( string currentFilename, string newDirectory ) : void
currentFilename string
newDirectory string
리턴 void

ReName() 공개 메소드

更改文件名
public ReName ( string currentFilename, string newFilename ) : void
currentFilename string
newFilename string
리턴 void

Upload() 공개 메소드

上传
public Upload ( string filename ) : void
filename string
리턴 void

UploadFile() 공개 메소드

public UploadFile ( string filename, string &info ) : bool
filename string
info string
리턴 bool