klyn.io.toml.TOML.save
method
public static save(path as Path, document as Map<String, Object>) as Void throws IOException, TOMLWriteException:
Description

Saves a root table to a path, replacing existing content.

Parameters
ParameterDescription
pathDestination path.
documentRoot TOML table.
Throws
  • IOException if the file cannot be written.
  • TOMLWriteException if a value cannot be represented by TOML.
Example
document = {"port": 8080l}
TOML.save(Path("config.toml"), document)