Pretty INI
Light library to read/write ini files.
Format
Header / Table / Section
[name]
Variable
myVar = value
Example
use ;
// File buffer
let mut file = default;
file.set_path;
// Load
let mut ini = default;
ini.load.unwrap;
// Access a var and add 1
let mut var_iter = ini.get_refmut.unwrap;
var_iter.set;
// Save the file
file.save;
Pre/Post Process
In the IniFile you can add some process using a ProcessAction.
Pre Process
Called before assign the file content to the buffer.
let action = Some;
ini_file.add_pre_process;
Post Process
Called before saving the file.
let action = Some;
ini_file.add_post_process;
⚠️ Warnings
- The output when saving will be reformated.
- Implicit "root" table.