Back to product page

DeleteFile function


Deletes a file on the server.

Type

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

Syntax

  • C
long Sftp_DeleteFile(void *Sftp, char *RemotePath);
The DeleteFile(void *Sftp,char *RemoteFile) syntax has these parts:
void *SftpHandle of the created Sftp instance.
char *RemoteFileFull path to a file on the server.

Remarks

This method will delete a file on the remote server, if possible. Once the deletion is complete, the Done callback will be called. If no error occurs, the ErrorCode argument in the Done callback will be set to 0 (zero). If an error occurrs, the ErrorCode will hold the error number and ErrorText will contain a description of the error.

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

Platforms

Windows