LifeLua 21-08-2025
Documentation for LifeLua, a Lua interpreter for the PS Vita
Loading...
Searching...
No Matches
toml

Reading TOML files (useful for settings/config files) More...

Detailed Description

Functions

table toml.parse (string path)
 

Function Documentation

◆ toml.parse()

table toml.parse ( string path)

Reads a TOML file into a Lua table. Dates and times become strings in the ISO 8601 format (e.g. "2025-08-21" or "2025-08-21T10:30:00.000000").

Parameters
pathPath to the .TOML file
Returns
A table with the contents of the file. Raises an error if the file is missing or invalid.
Example:
-- settings.toml:
-- [player]
-- name = "Harommel"
-- volume = 80
local settings = toml.parse("app0:settings.toml")
print(settings.player.name, settings.player.volume)