Differences
This shows you the differences between the selected revisions of the page.
| 2016-02-03 | 2016-02-03 | ||
| redundant type specification (martin) | no my prefix (martin) | ||
| Line 157: | Line 157: | ||
| Try | Try | ||
| ' Setup session options | ' Setup session options | ||
| - | Dim mySessionOptions As New SessionOptions | + | Dim sessionOptions As New SessionOptions |
| - | With mySessionOptions | + | With sessionOptions |
| .Protocol = Protocol.Sftp | .Protocol = Protocol.Sftp | ||
| .HostName = "example.com" | .HostName = "example.com" | ||
| Line 166: | Line 166: | ||
| End With | End With | ||
| - | Using mySession As New Session | + | Using session As New Session |
| ' Will continuously report progress of synchronization | ' Will continuously report progress of synchronization | ||
| - | AddHandler mySession.FileTransferred, AddressOf FileTransferred | + | AddHandler session.FileTransferred, AddressOf FileTransferred |
| ' Connect | ' Connect | ||
| - | mySession.Open(mySessionOptions) | + | session.Open(sessionOptions) |
| ' Synchronize files | ' Synchronize files | ||
| - | Dim mySynchronizationResult As SynchronizationResult | + | Dim synchronizationResult As SynchronizationResult |
| - | mySynchronizationResult = _ | + | synchronizationResult = _ |
| - | mySession.SynchronizeDirectories( _ | + | session.SynchronizeDirectories( _ |
| SynchronizationMode.Remote, "d:\www", "/home/martin/public_html", False) | SynchronizationMode.Remote, "d:\www", "/home/martin/public_html", False) | ||
| ' Throw on any error | ' Throw on any error | ||
| - | mySynchronizationResult.Check() | + | synchronizationResult.Check() |
| End Using | End Using | ||