Fetch the repository succeeded.
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
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。