readResourceText

actual fun readResourceText(path: String): String?(source)

Reads a text file shipped inside the app, or null if there is none at path:

  • Android: src/main/assets/<path> (call initKonstantAndroid first, or register KonstantInitProvider)

  • iOS/macOS: the main bundle's resources

  • JVM: the classpath (src/main/resources/<path>)

  • JS and Wasm on Node, and Linux: a file at path, relative to the working directory

  • Browsers: nothing, so this returns null. Bake config with the Konstant Gradle plugin instead

actual fun readResourceText(path: String): String?(source)

Reads a text file shipped inside the app, or null if there is none at path:

  • Android: src/main/assets/<path> (call initKonstantAndroid first, or register KonstantInitProvider)

  • iOS/macOS: the main bundle's resources

  • JVM: the classpath (src/main/resources/<path>)

  • JS and Wasm on Node, and Linux: a file at path, relative to the working directory

  • Browsers: nothing, so this returns null. Bake config with the Konstant Gradle plugin instead

expect fun readResourceText(path: String): String?(source)

Reads a text file shipped inside the app, or null if there is none at path:

  • Android: src/main/assets/<path> (call initKonstantAndroid first, or register KonstantInitProvider)

  • iOS/macOS: the main bundle's resources

  • JVM: the classpath (src/main/resources/<path>)

  • JS and Wasm on Node, and Linux: a file at path, relative to the working directory

  • Browsers: nothing, so this returns null. Bake config with the Konstant Gradle plugin instead

actual fun readResourceText(path: String): String?(source)

Reads a text file shipped inside the app, or null if there is none at path:

  • Android: src/main/assets/<path> (call initKonstantAndroid first, or register KonstantInitProvider)

  • iOS/macOS: the main bundle's resources

  • JVM: the classpath (src/main/resources/<path>)

  • JS and Wasm on Node, and Linux: a file at path, relative to the working directory

  • Browsers: nothing, so this returns null. Bake config with the Konstant Gradle plugin instead

actual fun readResourceText(path: String): String?(source)

Reads a text file shipped inside the app, or null if there is none at path:

  • Android: src/main/assets/<path> (call initKonstantAndroid first, or register KonstantInitProvider)

  • iOS/macOS: the main bundle's resources

  • JVM: the classpath (src/main/resources/<path>)

  • JS and Wasm on Node, and Linux: a file at path, relative to the working directory

  • Browsers: nothing, so this returns null. Bake config with the Konstant Gradle plugin instead

actual fun readResourceText(path: String): String?(source)

Reads a text file shipped inside the app, or null if there is none at path:

  • Android: src/main/assets/<path> (call initKonstantAndroid first, or register KonstantInitProvider)

  • iOS/macOS: the main bundle's resources

  • JVM: the classpath (src/main/resources/<path>)

  • JS and Wasm on Node, and Linux: a file at path, relative to the working directory

  • Browsers: nothing, so this returns null. Bake config with the Konstant Gradle plugin instead

actual fun readResourceText(path: String): String?(source)

Reads a text file shipped inside the app, or null if there is none at path:

  • Android: src/main/assets/<path> (call initKonstantAndroid first, or register KonstantInitProvider)

  • iOS/macOS: the main bundle's resources

  • JVM: the classpath (src/main/resources/<path>)

  • JS and Wasm on Node, and Linux: a file at path, relative to the working directory

  • Browsers: nothing, so this returns null. Bake config with the Konstant Gradle plugin instead