------ #### SuperDesign V3.0.2412.2001 - *.[新增]新增程序更新日志设置和自动发布功能。 - *.[修复]修复Post数据格式不正确时双击文本框会导致软件闪退的BUG。
102 lines
3.0 KiB
C#
102 lines
3.0 KiB
C#
using ExtendUI.FTPManager;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
|
|
namespace FTPop
|
|
{
|
|
public interface IFTP
|
|
{
|
|
/// <summary>
|
|
/// 打开FTP
|
|
/// </summary>
|
|
/// <param name="ftpinfo"></param>
|
|
int Open(FTPInfo ftpinfo);
|
|
/// <summary>
|
|
/// 关闭FTP
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
int Close();
|
|
/// <summary>
|
|
/// 显示文件夹列表
|
|
/// </summary>
|
|
/// <param name="CurFolder"></param>
|
|
/// <returns></returns>
|
|
List<ExtendUI.FTPManager.RemoteFileInfo> ListDirectory(string CurFolder);
|
|
/// <summary>
|
|
/// 上传
|
|
/// </summary>
|
|
/// <param name="localPath"></param>
|
|
/// <param name="remotePath"></param>
|
|
/// <returns></returns>
|
|
int Upload(string localPath, string remotePath);
|
|
/// <summary>
|
|
/// 下载
|
|
/// </summary>
|
|
/// <param name="localPath"></param>
|
|
/// <param name="remotePath"></param>
|
|
/// <returns></returns>
|
|
int Download(string remotePath, string localPath);
|
|
string ErrorMsg { get; set; }
|
|
/// <summary>
|
|
/// 删除文件
|
|
/// </summary>
|
|
/// <param name="remotePath"></param>
|
|
/// <returns></returns>
|
|
int RemoveFiles(string remotePath);
|
|
/// <summary>
|
|
/// 创建文件夹
|
|
/// </summary>
|
|
/// <param name="remotePath"></param>
|
|
/// <returns></returns>
|
|
bool CreateDir(string remotePath);
|
|
/// <summary>
|
|
/// 移动文件
|
|
/// </summary>
|
|
/// <param name="remotePath"></param>
|
|
/// <returns></returns>
|
|
int MoveFile(string fromPath,string toPath);
|
|
/// <summary>
|
|
/// 文件是否存在
|
|
/// </summary>
|
|
/// <param name="remotePath"></param>
|
|
/// <returns></returns>
|
|
bool FileExists(string remotePath);
|
|
/// <summary>
|
|
/// 文件大小
|
|
/// </summary>
|
|
/// <param name="remotePath"></param>
|
|
/// <returns></returns>
|
|
Int64 FileSize(string remotePath);
|
|
/// <summary>
|
|
/// 文件最后修改时间
|
|
/// </summary>
|
|
/// <param name="remotePath"></param>
|
|
/// <returns></returns>
|
|
DateTime FileLastWriteTime(string remotePath);
|
|
/// <summary>
|
|
/// 文件信息
|
|
/// </summary>
|
|
/// <param name="remotePath"></param>
|
|
/// <returns></returns>
|
|
ExtendUI.FTPManager.RemoteFileInfo GetFileInfo(string remotePath);
|
|
/// <summary>
|
|
/// 文件传输事件
|
|
/// </summary>
|
|
event FileTransferProgressEventHandler FileTransferProgress;
|
|
/// <summary>
|
|
/// 当前ID
|
|
/// </summary>
|
|
int Id { get; set; }
|
|
/// <summary>
|
|
/// 当前Tag
|
|
/// </summary>
|
|
object Tag { get; set; }
|
|
/// <summary>
|
|
/// 最后一次错误
|
|
/// </summary>
|
|
string LastError { get; set; }
|
|
}
|
|
}
|