Dart.Ssh Namespace > Sftp Class > Put Method : Put(String,String,Boolean,Boolean,CopyMode) Method |
'Declaration Public Overloads Function Put( _ ByVal localSearchPattern As String, _ ByVal remoteDirectory As String, _ ByVal recurse As Boolean, _ ByVal includeEmptyFolders As Boolean, _ ByVal mode As CopyMode _ ) As CopyResult()
'Usage Dim instance As Sftp Dim localSearchPattern As String Dim remoteDirectory As String Dim recurse As Boolean Dim includeEmptyFolders As Boolean Dim mode As CopyMode Dim value() As CopyResult value = instance.Put(localSearchPattern, remoteDirectory, recurse, includeEmptyFolders, mode)
public CopyResult[] Put( string localSearchPattern, string remoteDirectory, bool recurse, bool includeEmptyFolders, CopyMode mode )
public: CopyResult*[]* Put( string* localSearchPattern, string* remoteDirectory, bool recurse, bool includeEmptyFolders, CopyMode mode )
public: array<CopyResult^>^ Put( String^ localSearchPattern, String^ remoteDirectory, bool recurse, bool includeEmptyFolders, CopyMode mode )
Exception | Description |
---|---|
System.ArgumentException | Thrown if the localSearchPattern does not contain a wildcard character (*). |
Use this overload to automatically create the folder structure on the server if the file(s) to upload includes a path that needs to be created on the server.
This method will only raise an exception if the localSearchPattern is invalid. For exceptions that occurred during execution, check CopyResult.GetException() of each returned CopyResult.
The Progress event is raised as this method executes if an event handler is attached.
If Sftp.ThreadingModel is ThreadingModel.ApartmentAsync, this method immediately returns a null value after starting a worker thread that executes the operation asynchronously. The Progress event is raised containing the result upon completion.