fromResource

fun fromResource(path: String, optional: Boolean = false): DotEnvSource(source)

Reads a .env 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.