Companion

Functions

Link copied to clipboard

Reads the file at path. Throws if it cannot be read, as in browsers, which have no file system; use fromString there.

Link copied to clipboard
fun fromResource(path: String, optional: Boolean = false): PropertiesSource

Reads a file bundled with the app, see readResourceText for where each platform looks. With optional a missing file gives an empty source instead of an error.

Link copied to clipboard
fun fromString(content: String, origin: String? = null): PropertiesSource

Parses properties text that is already in memory. origin, such as the file name, labels the source in ConfigLoader.explain reports.