ReceiveFile

<< Click to Display Table of Contents >>

Manual > Control Reference > Route > Route Methods >

ReceiveFile


 

Receive files in the public folder from the server.

 


syntax

ReceiveFile(

         name,
         serverFile,

         clientFile

         [, receiveMode = ""]

         [, bAsync = FALSE]

         [, eventTarget]

         [, eventName]

         [, eventGroup]

         )

 


Parameters

 

name


Type:

character


The public folder name.

 

However, if the following are specified, the corresponding behavior will occur.

"[local]": Copied from serverFile to clientFile as a local file. Example: ReceiveFile("[local]", "c:\data1\xxx.txt", "c:\data2\xxx.txt);

 

serverFile


Type:

character


File path of the server (the PC on which the server is running).

If you specify the public folder name starting with \\, such as "\\server_data_cnf1\abc1.jpg", the name argument will be ignored.

 

clientFile


Type:

character


The file path on the client (the PC on which the browser is running).

 

receiveMode


Type:

character


File receiving mode. If empty, always receive files from the server.

FALSEIFEXISTS: If the file exists on the client side, it will not be received.

FALSEIFEXISTSANDSAMETIME: If a file exists on the client side and the dates of the file on the server side and the file on the client side are the same, reception will not be performed.

FALSEIFEXISTSANDOLDTIME: If the file exists on the client side and the date of the file on the server side is older, the file will not be received.

 

bAsync


Type:

Boolean


TRUE - Receive the file asynchronously. FALSE - Do not receive the file asynchronously.

 

eventTarget


Type:

Object


Specify an object if you want to generate the common event "OnCommonEvent" after processing is completed. In the case of asynchronous (bAsync=T), you must ensure that the specified object exists until the event occurs. Please note that an application error will occur if the object no longer exists.

 

eventName


Type:

character


Specify the string to be passed as the first argument (name) of the common event.

 

The argument specifications for OnCommonEvent are as follows:

event OnCommonEvent(name, value)

name : The string specified in eventName

value: The array below.

value[0] : Method name ("ReceiveFile")

value[1]: On success - TRUE. On failure - FALSE.

value[2]: The string specified in eventGroup.

value[3]: Public folder name (the value specified as the first argument of ReceiveFile).

value[4]: Server file path (the value specified as the second argument of ReceiveFile).

value[5]: Client file path (the value specified as the third argument of ReceiveFile).

 

eventGroup


Type:

character


Event group name. If you specify this group name in the CancelReceiveFile method, you can cancel an asynchronous receive request.

 

Return Value



Type:

Boolean


FALSE - Failure. TRUE - Success.

 


 


Supported


×

Script Action

○

Browser script

×

Calculation formula syntax

 

 


reference