|
Receive the file from the FTP server.
syntax
FTPReceiveFile(
remoteFile,
localFolder,
requestID
)
Parameters
remoteFile
|
|
Type:
|
character
|
|
The name of the file to receive. (This is a file on the FTP server.)
|
localFolder
|
|
Type:
|
character
|
|
The destination folder. (This is a folder in the action's public folder.)
|
requestID
|
|
Type:
|
character
|
|
0 - Synchronous communication (after execution, the method waits until the transmission is completed).
1 or more - Asynchronous communication. (After execution, the method will immediately terminate and the success or failure will be notified by the OnFTPRequestDone event. The requestID will be passed in the event.)
|
Return Value
|
|
Type:
|
Boolean
|
|
FALSE - Failure. TRUE - Success.
|
Receives a file from the FTP server.
In the case of synchronous communication, you can determine whether reception was successful from the return value. If it takes a long time to receive the file, set the timeout setting (PSTimeOut root property) to a longer value.
|
Example
In case of synchronous communication
|
if (!this.FTPReceiveFile("www/data/sample.txt", "data", 0)
{
::OpenMessage(this.GetLastError());
}
|
In the case of asynchronous communication, the OnFTPRequestDone event is used to determine whether the request was successful.
Asynchronous communication is recommended if the communication may take a long time..
|
reference
FTPSetServer
FTPSendFile
FTPAppendFile
FTPReceiveFile
FTPRenameFile
FTPDeleteFile
FTPMakeFolder
FTPDeleteFolder
|