FTP Function Reference

sFTPPullStart

FTP Function Reference

This function starts a download stream with the remote server. You must use sFTPPullMore and sFTPPullEnd to complete the transfer.

Declare Function sFTPPullStart Lib "SapphireFTP.dll" (ByVal sRemoteFile As String, ByVal sLocalFile As String, ByVal lOverWriteFile As Long, ByVal lTransferType As Long, ByVal lLicence As Long) As Long

Parameters

  sRemoteFile
    A string specifying the name of the remote file to retrieve.
  sLocalFile
    A string specifying the name of the new local file the remote data will be copied to.
  lOverWriteFile
    A long indicating whether to overwrite an existing local file. Use FTP_OVERWRITE and FTP_DONT_OVERWRITE for this parameter.
  lTransferType
    A long specifying how the function will handle the download. Use one of the following:
FTP_TRANSFER_UNKNOWN
FTP_TRANSFER_ASCII
FTP_TRANSFER_BINARY
  lLicence
    A long specifying the licence number of the registered utility. If using in demo mode, enter 1234567890.

Return Values

  Returns a number indicating success or failure. If the operation was successful then the return value will be FTP_NO_ERROR. Use sFTPErrorText to get a string version of the error message.