Back to product page

LocalPath function


Holds the name of the local path used for transferring.

Type

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

Syntax

  • C
long Sftp_GetLocalPath(void *Sftp, char *Buffer, int *Bufsize);
long Sftp_SetLocalPath(void *Sftp, char *newVal);
The LocalPath(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 property specifies the filename (or directory name) on the local computer, which will be used by any of the methods that require this information. All of the methods that support setting LocalPath as an argument to the method call can also get the value from this property.

For example, the GetFile method has two optional arguments: LocalPath and RemoteFile. If you don't set the LocalPath 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 LocalPath property with the argument value.

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