VB.NET parameter issues of function: session.SynchronizeDirectories()
Platform: Visual Studio 2017
language: VB.NET
source: NuGet
Version of WinSCP: 5.13.6
protocol: FTP
I was trying to enable some transfer options and my code is like this
However the complier reports:
Error BC30311: Value of type 'OverwriteMode' cannot be converted to 'TransferOptions'.
After looking up the definiton of "TransferOptions", I found that it is a class:
The initializer is empty and lack "End sub". I am unable to initial property and pass valid argument as I even tried
I am not familiar with VB.NET. Could you please help me out?
language: VB.NET
source: NuGet
Version of WinSCP: 5.13.6
protocol: FTP
I was trying to enable some transfer options and my code is like this
Dim synchronizationResult As SynchronizationResult synchronizationResult = session.SynchronizeDirectories( SynchronizationMode.Remote, localFolderPath, targetFolderPath, True, criteria:=SynchronizationCriteria.Either, options:=OverwriteMode.Overwrite)
However the complier reports:
Error BC30311: Value of type 'OverwriteMode' cannot be converted to 'TransferOptions'.
After looking up the definiton of "TransferOptions", I found that it is a class:
Public NotInheritable Class TransferOptions Public Sub New() Public Property PreserveTimestamp As Boolean Public Property FilePermissions As FilePermissions Public Property TransferMode As TransferMode Public Property FileMask As String Public Property ResumeSupport As TransferResumeSupport Public Property SpeedLimit As Integer Public Property OverwriteMode As OverwriteMode End Class
The initializer is empty and lack "End sub". I am unable to initial property and pass valid argument as I even tried
options:= new TransferOpions(OverwriteMode.Overwrite)