wodSFTP API library - RemoveDir Method
      
 

Description

Removes a directory from the server.


Return type

A Long value. If successful, 0 is returned, otherwise error as specified here


Syntax

long Sftp_RemoveDir(void *Sftp, char *RemotePath);

The RemoveDir function syntax has these parts:

Part Description
void *Sftp Handle of the created Sftp instance.
RemotePath Optional. A Variant value. Full path to a directory on the server.

Remarks

This function will remove a directory on the remote server, if possible. Once the remove is complete, the Done callback will be invoked. If no error occurs, the ErrorCode argument in the Done callback will be set to 0 (zero). If an error occurs, ErrorCode will hold the number of the error and ErrorText will contain a description of the error.

If the remote directory contains files or subdirectories - it is possible (and the most common behavior) that you will be not be able to remove it. This depends on the server's implementation of this command.

No wildcards can be used for the RemotePath argument. The RFC protocol specification for SFTP does not allow them.