Description:
Return a remote file from a node.
Syntax:
file( fn:cs,h)
Note:
The function returns remote file fn from node h. As a local file, the remote one is both readable and writable.
Parameter:
fn |
To-be-loaded file represented by an absolute path or a relative path that is relative to the main directory |
cs |
Character set, which is a JVM built-in one; use the system default when the parameter is absent |
h |
A node |
Return value:
A file object
Example:
|
A |
|
1 |
=file("D:/City.txt":"UTF-8",["192.168.46.1:8281"]) |
Return City.txt file under D:/ directory in node 192.168.46.1:8281 using character set UTF-8. |
2 |
=A1.import@t() |
Read in content of A1’s file. |
3 |
=file("tmp.txt",["192.168.31.165:8281"]) |
Return tmp.txt file under the main directory in node 192.168.31.165:8281. |
4 |
>A3.write("hello world!") |
Write string "hello world!" to A3’s file. |