Пример #1
0
void get_addon_pbl_info(const std::string& addon_name, config& cfg)
{
	const std::string& pbl_path = get_pbl_file_path(addon_name);
	try {
		scoped_istream stream = istream_file(pbl_path);
		read(cfg, *stream);
	} catch(const config::error& e) {
		throw invalid_pbl_exception(pbl_path, e.message);
	}
}
Пример #2
0
void set_addon_pbl_info(const std::string& addon_name, const config& cfg)
{
	scoped_ostream stream = ostream_file(get_pbl_file_path(addon_name));
	write(*stream, cfg);
}
Пример #3
0
bool have_addon_pbl_info(const std::string& addon_name)
{
	return filesystem::file_exists(get_pbl_file_path(addon_name));
}