cfg
简介
配置文件详细说明请看这篇飞书文档:pkg.cfg和pkg.json_config说明
组件接口
cfg.gs
函数原型 | 函数作用 |
---|---|
void init(map args) | Init cfg package |
void init_by_map(map m) | 用指定的数据初始化,可以通过cfg.get_config获取相关配置 |
bool is_inited() | 是不是已经进行初始化 |
map load(string cfg_path) | load cfg package |
mixed get_config(string path) | Get config by path as a key |
void locate_config(string path) | 定位一个配置所在的文件 |