PowerTCP SSH and SFTP for .NET
RemoveDirectory Method




The absolute or relative (to WorkingDirectory) path of the directory to remove.
Removes a directory and its subfolders and files.
Syntax
'Declaration
 
Public Function RemoveDirectory( _
   ByVal directoryPath As String _
) As RemoveResult()
'Usage
 
Dim instance As Sftp
Dim directoryPath As String
Dim value() As RemoveResult
 
value = instance.RemoveDirectory(directoryPath)
public RemoveResult[] RemoveDirectory( 
   string directoryPath
)
public: RemoveResult*[]* RemoveDirectory( 
   string* directoryPath
) 
public:
array<RemoveResult^>^ RemoveDirectory( 
   String^ directoryPath
) 

Parameters

directoryPath
The absolute or relative (to WorkingDirectory) path of the directory to remove.

Return Value

An array of RemoveResult objects representing the files and directories removed.
Remarks

This method will not throw an exception under error conditions. Instead, check the Exception property of each returned RemoveResult.

If removal of non-empty directories is not desired, use List to check for subfolders or files.

See Also

Reference

Sftp Class
Sftp Members


PowerTCP SSH and SFTP for .NET Documentation Version 7.0
© 2023 Dart Communications. All Rights Reserved.
Send comments on this topic