ini.load(file)function

Load and decode a file containing ini data, following those rules :

Parameters

file

A File object or a filename string, representing the file whose content will be decoded from ini.

Return value

Returns the corresponding Lua table or a nil value in case of error.

Example

--! luart-extensions import ini -- Load the old but still alive Windows "system.ini" file local system = ini.load(sys.env.windir.."/system.ini") -- prints the content of the 'wave' key in the section 'drivers' print(system.drivers.wave)