file( fn:z , h )

Read(421) Label: remote file, node, partition,

Description:

Open a remote file with a specified name.

Syntax:  

file(fn:z,h)

Note:  

When parameter h is the sequence of the nodes’ main processes, the function finds file fn, which is read-only, in partition z on a certain node in h. The search will first performed on the local machine, and then on the idle remote machines if fn can’t be found locally. If h is a single value, find fn on h; the remote fn can be written. Find the file under the main directory on the node if parameter z is absent.

Parameters:  

 

fn

Name of the file to be loaded. Both the absolute path and the relative path are acceptable. With a relative path, it is relative to the main path. The main path on the IDE is the one configured on the option menu of esProc, and by default it is the current directory. The main path on a server is the value of mainPath in the configuration file raqsoftConfig.xml; this value shouldn’t be null

Z

h

Partition name

A sequence of nodes

 

Options:

@t

Perform read and write operations in the temporary directoy on the target node, with z ignored.

Return value:  

File object.

Example:

file("D:\\Scores.txt","192.168.0.20:9282")

Load the file “Scores.txt” from the D:\ of the local machine; character set is UTF-8

file("Scores.txt","192.168.0.20:9282")

Firstly, load the Scores.txt file under the main path of the local machine

file("Scores1.txt":0, “192.168.0.20:9282”)

 

 

 

 

If Scores1.txt is not found locally, then load the file in partition 0 on server "192.168.0.20:9282"