Config
Theconfig module loads Lua configuration files from the consuming resource and caches the result. It can validate loaded values with the validator module before returning them.
Load a config file
config/settings.lua
shared.lua
File paths are normalized before loading, so
config/settings.lua resolves through the same module-style path as config.settings.Cache and reload
- load
- reload
config:load(filePath, schema?) returns the cached value after the first read. If you pass a schema later, the cached value is still validated before it is returned.