:GetFile()


Class

     aprFTP()

 

Syntax

     :GetFile( cRemoteFile, [cLocalFile], [lAppend], [hSession] ) -> lSuccess

 

Parameters

 

cRemoteFile

File name to retrieve from remote server.

 

cLocalFile

Optional. File name to create or append to. Default is same name as cRemoteFile.

 

lAppend

Optional. Logical indicating whether to append to existing file or create a new file or overwrite an existing file. Default is .F., which overwrites or creates a new file.

 

hSession

Optional: If hSession is not passed, the value in :Session will be used

 

Return

Logical indicating Success.

Returns .T. if the operation succeeds, otherwise returns .F.

To get further error information see :nErr and :cErr

To see the remote server's response, see :GetResultCode() and :GetResultString().

 

Description

 The :GetFile() method transfers the specified file on the remote server to the local system.

  

This method will cause the calling application to block until the file transfer completes, times-out or is canceled.

Because this method calls the PeekMessage function, it is possible that the application can be re-entered during the file transfer. Those functions which can be safely called during a file transfer are :Cancel(), :GetBytesCopied() and :GetTransferTime().

 

See Also

:ChangeDirectory(), :GetBytesCoppied(), :GetMultipleFiles(), :GetTransferTime(), :PutFile(), :PutMultipleFiles(), :SetBufferSize()