Description
-
Retrieves the contents of a remote file to a locally specified
buffer, starting from a given position.
Return type
-
A Long value. If successful, 0 is returned, otherwise
error as specified here.
Syntax
-
long Sftp_GetDataToBufferAt(void *Sftp, char
*RemoteFile, __int64 RemotePos, char *Buffer, int *BufSize);
The GetDataToBufferAt function syntax has these parts:
| void
*Sftp |
Handle of the created Sftp
instance. |
| char
*RemoteFile |
Full path to a file on
the server. |
| __int64 RemotePos |
Position in the file from
where copying is performed. |
| char *Buffer |
Pointer to allocated buffer
where data will be stored. |
| int *BufSize |
Pointer to the size of the buffer. |
Remarks
-
GetDataToBufferAt will
get part of the file from the server and copy it to the local buffer that you have
allocated. When the transfer is complete, the Done callback will fire.
wodSFTPdll will copy as many bytes as you specify in BufSize.
When all data is retrieved and Done was called, your BufSize
variable will be filled with value representing total number of
bytes actually received. You can use the RemotePos argument
to specify a position in the file at which copying will commence.
|