:PutFile()
Class
Syntax
:PutFile( cLocalFile, [cRemoteFile], [lAppend], [hSession] ) -> lSuccess
Parameters
|
|
cLocalFile |
File name to transfer to the remote server. |
|
|
cRemoteFile |
Optional. File name to create or append to. Default is same name as cLocalFile. |
|
|
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 :PutFile() method transfers the specified file on the local system to the remote server.
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(), :GettFile(), :PutMultipleFiles(), :SetBufferSize()