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

Loads a TOML document from a path.

Parameters
ParameterDescription
pathFile path to load.
Returns

Parsed root table.

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