Back to product page

RemotePath function


Holds the name of the path on the server used for transferring.

Type

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

Syntax

  • C
long Sftp_GetRemotePath(void *Sftp, char *Buffer, int *Bufsize);
long Sftp_SetRemotePath(void *Sftp, char *newVal);
The RemotePath(void *Sftp,char *Buffer,int *Bufsize) syntax has these parts:
void *SftpHandle of the created Sftp instance.
char *BufferBuffer that will hold the returned string.
int *BufsizeSize of the buffer.

Remarks

This function specifies the filename (or directory name) on the remote server which will be used in calls to any of methods that require this information. All of the methods that support setting RemotePath as an argument to the method call can also get the value from this property.

For example, the PutFile method has two optional arguments: LocalFile and RemotePath. If you don't set the RemotePath argument, you should specify it in this property prior to calling the method. If you specify it as the method argument, wodSFTP will overwrite the RemotePath property with the value you entered as the argument.

The Bufsize variable should contain the maximum data length that can be stored in the Buffer variable. If you set Bufsize = 0, then the function will return with error ERROR_INSUFFICIENT_BUFFER and Bufsize will contain the required buffer size.

Platforms

Windows