klyn.io.toml.TOML.load
method
public static load(filename as String) as SortedMap<String, Object> throws IOException, TOMLParseException:
Description

Loads a TOML document from a UTF-8 file.

Parameters
ParameterDescription
filenameFile to load.
Returns

Parsed root table.

Throws
  • IOException if the file cannot be read.
  • TOMLParseException if its content is invalid.
Example
config = TOML.load("config.toml")
print(config["title"])