Class FtpOperater
Namespace: Tool.Utils.FtpHelper
Assembly: Tool.Net.dll
FTP操作类
public class FtpOperaterInheritance
Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Extension Methods
ObjectExtension.Add<T>(object, object, object), ObjectExtension.CopyEntity(object, object, params string[]), ObjectExtension.EntityToJson(object), ObjectExtension.EntityToJson(object, bool), ObjectExtension.EntityToJson(object, bool, string), DictionaryExtension.GetDictionary(object), TypeExtension.GetFieldKey(object, string, out bool), TypeExtension.GetFieldKey<T>(object, string, out bool), TypeExtension.GetFieldKey(object, Type, string, out bool), ObjectExtension.GetIntPtr(object), ObjectExtension.GetIntPtrInt(object), TypeExtension.GetPropertieFind(object, string, bool), TypeExtension.GetProperties(object), TypeExtension.GetPropertyKey(object, string, out bool), TypeExtension.GetPropertyKey<T>(object, string, out bool), TypeExtension.GetPropertyKey(object, Type, string, out bool), TypeExtension.GetValue(object, PropertyDescriptor), TypeExtension.GetValue(object, string, bool), TypeExtension.GetValue(object, string), ObjectExtension.Read<T>(object, object, int, int), ObjectExtension.Read<T>(object, int, object, int, int), DictionaryExtension.SetDictionary(object, IDictionary<string, object>), TypeExtension.SetFieldKey(object, string, object), TypeExtension.SetFieldKey<T>(object, string, object), TypeExtension.SetFieldKey(object, Type, string, object), TypeExtension.SetPropertyKey(object, string, object), TypeExtension.SetPropertyKey<T>(object, string, object), TypeExtension.SetPropertyKey(object, Type, string, object), TypeExtension.SetValue(object, PropertyDescriptor, object), TypeExtension.SetValue(object, string, object, bool), TypeExtension.SetValue(object, string, object), ObjectExtension.ToBase64String(object), ObjectExtension.ToBytes(object), ObjectExtension.ToBytes(object, out Type), DictionaryExtension.ToDictionary(object), DictionaryExtension.ToDictionary<T>(object), DictionaryExtension.ToIDictionary(object), DictionaryExtension.ToIDictionary<T>(object), ObjectExtension.ToJson(object), ObjectExtension.ToJson(object, JsonSerializerOptions), ObjectExtension.ToJsonWeb(object), ObjectExtension.ToJsonWeb(object, Action<JsonSerializerOptions>), ObjectExtension.ToTryVar<T>(object, T), ObjectExtension.ToVar<T>(object), ObjectExtension.ToVar(object, Type, bool), ObjectExtension.ToVar(object, string), ObjectExtension.ToXml(object)
Remarks
代码由逆血提供支持
Properties
FolderWX
Ftp密码
public string FolderWX { get; set; }Property Value
FolderZJ
Ftp密码
public string FolderZJ { get; set; }Property Value
Ftp
全局FTP访问变量
public FtpClient Ftp { get; set; }Property Value
Pass
Ftp密码
public string Pass { get; set; }Property Value
Server
Ftp服务器
public string Server { get; set; }Property Value
User
Ftp用户
public string User { get; set; }Property Value
Methods
AddMSCFile(string, string, string, string, string, string)
修改文件
public bool AddMSCFile(string ftpFolder, string ftpFileName, string localFolder, string localFileName, string BscInfo, string path)Parameters
ftpFolder string
本地目录
ftpFileName string
本地文件名temp
localFolder string
本地目录
localFileName string
本地文件名
BscInfo string
path string
获得应用程序所在的完整的路径
Returns
CanConnect()
测试FTP服务器是否可登陆
public bool CanConnect()Returns
DelFile(string, string)
删除文件
public bool DelFile(string ftpFolder, string ftpFileName)Parameters
ftpFolder string
ftp目录
ftpFileName string
ftp文件名
Returns
GetFile(string, string, string, string)
下载文件
public bool GetFile(string ftpFolder, string ftpFileName, string localFolder, string localFileName)Parameters
ftpFolder string
ftp目录
ftpFileName string
ftp文件名
localFolder string
本地目录
localFileName string
本地文件名
Returns
GetFileInfo(string, string)
得到FTP上文件信息
public string GetFileInfo(string ftpFolder, string ftpFileName)Parameters
ftpFolder string
FTP目录
ftpFileName string
ftp文件名
Returns
GetFileInfoConnected(string, string)
得到FTP上文件信息
public string GetFileInfoConnected(string ftpFolder, string ftpFileName)Parameters
ftpFolder string
FTP目录
ftpFileName string
ftp文件名
Returns
GetFileList(string, string)
得到文件列表
public string[] GetFileList(string ftpFolder, string strMask)Parameters
ftpFolder string
FTP目录
strMask string
Returns
string[]
FTP通配符号
GetFileNoBinary(string, string, string, string)
下载文件
public bool GetFileNoBinary(string ftpFolder, string ftpFileName, string localFolder, string localFileName)Parameters
ftpFolder string
ftp目录
ftpFileName string
ftp文件名
localFolder string
本地目录
localFileName string
本地文件名
Returns
GetFtpClient()
得到FTP传输对象
public FtpClient GetFtpClient()Returns
GetList(string)
得到文件列表
public string[] GetList(string strPath)Parameters
strPath string
Returns
string[]
PutFile(string, string)
上传文件
public bool PutFile(string ftpFolder, string ftpFileName)Parameters
ftpFolder string
ftp目录
ftpFileName string
ftp文件名