1 Star 0 Fork 0

青侠oO/FluentFTP

Create your Gitee Account
Explore and code with more than 13.5 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
UploadManyFiles.vb 1.12 KB
Copy Edit Raw Blame History
Imports System
Imports System.Net
Imports System.Threading
Imports System.Threading.Tasks
Imports FluentFTP
Namespace Examples
Friend Module UploadFilesExample
Sub UploadFiles()
Using ftp = New FtpClient("127.0.0.1", "ftptest", "ftptest")
ftp.Connect()
' upload many files, skip if they already exist on server
ftp.UploadFiles({
"D:\Drivers\test\file0.exe",
"D:\Drivers\test\file1.exe",
"D:\Drivers\test\file2.exe",
"D:\Drivers\test\file3.exe",
"D:\Drivers\test\file4.exe"
}, "/public_html/temp/", FtpRemoteExists.Skip)
End Using
End Sub
Async Function UploadFilesAsync() As Task
Dim token = New CancellationToken()
Using ftp = New FtpClient("127.0.0.1", "ftptest", "ftptest")
Await ftp.ConnectAsync(token)
' upload many files, skip if they already exist on server
Await ftp.UploadFilesAsync({
"D:\Drivers\test\file0.exe",
"D:\Drivers\test\file1.exe",
"D:\Drivers\test\file2.exe",
"D:\Drivers\test\file3.exe",
"D:\Drivers\test\file4.exe"
}, "/public_html/temp/", FtpRemoteExists.Skip)
End Using
End Function
End Module
End Namespace
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/MuNet/FluentFTP.git
git@gitee.com:MuNet/FluentFTP.git
MuNet
FluentFTP
FluentFTP
master

Search