Browse Source

chore: fix typos in generated KDoc of getAsFlow

pull/4500/head
Chanjung Kim 9 months ago
parent
commit
78d1f504b6
  1. 10
      gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/resources/ResourcesSpec.kt

10
gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/resources/ResourcesSpec.kt

@ -160,15 +160,15 @@ internal fun getResFileSpecs(
"""
Returns a flow which emits the content of the resource file as byte array chunks. The length of each
chunk is not empty and has the length of [byteCount] or smaller. The flow will throw
[MissingResourceException] when the resource file is missing or [ResourceIOException] if any IO
error occurs. You can catch those with the [catch][kotlinx.coroutines.flow.catch] operator. This
function is useful when the resource is too big to be contained in a single [ByteArray].
[MissingResourceException][org.jetbrains.compose.resources.MissingResourceException] when the
resource file is missing or [ResourceIOException][org.jetbrains.compose.resources.ResourceIOException]
if any IO error occurs. You can catch those with the [catch][kotlinx.coroutines.flow.catch] operator.
This function is useful when the resource is too big to be contained in a single [ByteArray].
Example: `val bytes = Res.getAsFlow("files/key.bin").collectToList().flatten()`
@param path The path of the file to read in the resource's directory.
@param byteCount The maximum length of the emitted byte arrays. The flow can emit an array smaller
than this length.
@param byteCount The maximum length of the emitted byte arrays. The flow can emit an array smaller than this length.
@return A flow that emits the content of the file as byte sub-arrays.

Loading…
Cancel
Save