replicate file()

This function can be used to replicate files or entire directories from the node controller to all active working nodes in a load balancing system. The function can only be executed on an active node controller. Note: See also section Configuration of a Node Controller (→ "replicateFiles" and "replicateAdminFiles").

The return value on success is "true". If an error occurred during replication or the working node is not active, the return value is "false". If working nodes are not active, no error occurs and the return value is not "false". If an unauthorised path was specified (→ see parameter b), the profile terminates with an error.

Parameters


Parameter

Description

a

Directory or path to file. Only the paths "./conf/" and "./etc/admin/datawizard/semantic" (only files with the extension ".xml" are replicated here and the rules are read in again on the working nodes) are allowed. See examples.

b

(optional) File encoding. Default: "ISO-8859-1". Note: Use the three dots to select a value.

Examples


Parameter a

Parameter b

Result

./etc/admin/datawizard/semantic


All files from this directory with the extension ".xml" are replicated from the node controller to all active working nodes. The rules are read in again there. The return value of the function is "true".

./conf/


All files from this directory are replicated from the node controller to all active working nodes. The return value of the function is "true".

./conf/example.txt


The specified file is replicated from the node controller to all active working nodes. The return value of the function is "true".

./etc/admin/datawizard/


Profile terminates with error, as directory not permitted.