csvWriterOrNull

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

Writes records as a given type T in a CSV file according to the given configuration or returns null 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> csvWriterOrNull(type: KClass<T>, configuration: Writer<T>.() -> Unit): Unit?

Writes records as a given type in a CSV file according to the given configuration or returns null when: