variable_string_from_file

Define a variable from a file content.

⚙️ Compatible targets: Linux, Windows

Parameters

NameDocumentation
prefixThe prefix of the variable name.

This parameter is required.
nameThe variable to define, the full name will be variable_prefix.variable_name.

This parameter is required.
file_nameThe path of the file.

This parameter is required.

Example

method: variable_string_from_file
params:
  file_name: VALUE
  prefix: VALUE
  name: VALUE

Documentation

To use the generated variable, you must use the form ${variable_prefix.variable_name} with each name replaced with the parameters of this method.

Be careful that using a global variable can lead to unpredictable content in case of multiple definition, which is implicitly the case when a technique has more than one instance (directive). Please note that only global variables are available within templates.