Getting Started > Use Lua Scripts > Method Reference > Config Methods

Config Methods
get_config
Load a configuration file.
Syntax
get_config( path )
Arguments
 
Discussion
Config files are cached after the first call to get_config, to avoid unnecessary disk I/O in the likely event that the same config is accessed frequently by subsequent invocations of the Lua script. One cache is maintained per Lua state, so the maximum number of reads for a config file is equal to the number of threads which are running Lua scripts
An error is raised if the configuration file does not exist.
Returns
A Config object.
getEncryptedValue
Returns the unencrypted value from the configuration file of an encrypted value.
Syntax
String getEncryptedValue(String section, String key)
Arguments
 
Returns
The unencrypted value.
getValue
Returns the value of the configuration parameter key in a given section. If the key does not exist in the section, then the default value is returned.
Syntax
getValue( String section, String key, String default )
Arguments
 
Returns
A string containing the value read from the configuration file.
getValues
Returns a table of strings if you have multiple values for a key (for example, a CSV or numbered like keyN).
Syntax
Table getValues(String section, String key)
Arguments
 
Returns
A table of strings of the values.