上传本地文件到FTP服务器,支持进度汇报和取消操作
Upload local files to an FTP server, with support for progress reporting and cancellation operations.
命名空间:
HslCommunication.Enthernet.Ftp
程序集:
HslCommunication (在 HslCommunication.dll 中) 版本:12.5.3.0 (12.5.3.0)
语法public OperateResult UploadFile(
string localFile,
string remoteFile,
Action<long, long> processReport = null,
HslCancelToken cancelToken = null
)
Public Function UploadFile (
localFile As String,
remoteFile As String,
Optional processReport As Action(Of Long, Long) = Nothing,
Optional cancelToken As HslCancelToken = Nothing
) As OperateResult
public:
OperateResult^ UploadFile(
String^ localFile,
String^ remoteFile,
Action<long long, long long>^ processReport = nullptr,
HslCancelToken^ cancelToken = nullptr
)
member UploadFile :
localFile : string *
remoteFile : string *
?processReport : Action<int64, int64> *
?cancelToken : HslCancelToken
(* Defaults:
let _processReport = defaultArg processReport null
let _cancelToken = defaultArg cancelToken null
*)
-> OperateResult
参数
- localFile
- 类型:SystemString
本地的文件 - remoteFile
- 类型:SystemString
服务器保存的路径,例如 /A/123.txt - processReport (Optional)
- 类型:SystemActionInt64, Int64
上传的进度 - cancelToken (Optional)
- 类型:HslCommunication.CoreHslCancelToken
取消操作对象
返回值
类型:
OperateResult是否上传成功
参见