Constructor
# new OCOConfig(ocoConfigFileopt)
Sets a new config file to be used by OCO
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
ocoConfigFile |
string
|
File
|
<optional> |
The config file to be used. If not set, will use the default file in the user's documents OCO folder. |
Methods
# absoluteURI() → {File|null}
Get the current config file
The File object representing the config file.
File
|
null
# get(key, defaultValueopt) → {*}
Gets a value from the config. The key can be a path separated by /
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
key |
string
|
The setting to get | ||
defaultValue |
*
|
<optional> |
null | The default value if the key is not set in the settings |
The value
*
# set(key, value)
Sets a new Key/Value pair in the config.
The key
Parameters:
Name | Type | Description |
---|---|---|
key |
string
|
The key. It can be a path-like string (i.e. 'after effects/bone type'). |
value |
*
|
The value to set |
# setConfig(ocoConfigFileopt) → {boolean}
Sets the config file to be used by OCO
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
ocoConfigFile |
string
|
File
|
<optional> |
The config file to be used. If not set, will use the default file in the user's documents OCO folder. If this is a File object, it's encoding will be ignored and always be set to UTF-8, as per the OCO specifications. |
Success.
boolean