Package io.github.kotools.csv.writer

Types

Writer
Link copied to clipboard
@SinceKotools(project = Project.Csv, version = "2.0")
interface Writer<in T : Any> : Manager

Scope for writing records with a given type T in a CSV file.

Functions

csvWriter
Link copied to clipboard
@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:

@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:

csvWriterAsync
Link copied to clipboard
@SinceKotools(project = Project.Csv, version = "2.0.2")
infix inline fun <T : Any> CoroutineScope.csvWriterAsync(noinline configuration: Writer<T>.() -> Unit): Deferred<Unit>

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

csvWriterOrNull
Link copied to clipboard
@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:

@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:

csvWriterOrNullAsync
Link copied to clipboard
@SinceKotools(project = Project.Csv, version = "2.0")
infix inline fun <T : Any> CoroutineScope.csvWriterOrNullAsync(noinline configuration: Writer<T>.() -> Unit): Deferred<Unit?>

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