Module 01_IniFile
IniFile: basically a Lua rewrite of SM's IniFile class that serves as the basis for the sm-ssc UserPrefs and ThemePrefs configuration systems.
Note that this is a namespace, not a class per se. So all it's functions are under IniFile
Usage:
IniFile.ReadFile("config.ini")
Functions
IniFile.StrToKeyVal (str) | Parses an "a=b" expresion string into a pair a,b |
IniFile.ReadFile (file_path) | Read a file as ini |
IniFile.WriteFile (file_path, tbl) | Read a file as ini |
Functions
- IniFile.StrToKeyVal (str)
-
Parses an "a=b" expresion string into a pair a,b
Parameters:
- str string
Returns:
- IniFile.ReadFile (file_path)
-
Read a file as ini
Parameters:
- file_path string path to ini file
Returns:
-
{section={key=value}}
parsedIniFile
- IniFile.WriteFile (file_path, tbl)
-
Read a file as ini
Parameters:
- file_path string path to ini file
- tbl {section={key=value}} iniFileTable
Returns:
-
bool
success