csvWriter

@SinceKotools(project = Project.Csv, version = "2.0")
inline suspend fun <T : Any> csvWriter(noinline configuration: Writer<T>.() -> Unit)

Writes records as a given type T in a CSV file according to the given configuration or throws an IllegalStateException when:

  • the type T is not a public or internal data class

  • the configuration is invalid.

@SinceKotools(project = Project.Csv, version = "2.0")
suspend fun <T : Any> csvWriter(type: KClass<T>, configuration: Writer<T>.() -> Unit)

Writes records as a given type in a CSV file according to the given configuration or throws an IllegalStateException when: