Package io.github.kotools.csv.reader

Types

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

Scope for reading a CSV file.

Functions

csvReader
Link copied to clipboard
@SinceKotools(project = Project.Csv, version = "2.0")
inline suspend fun <T : Any> csvReader(noinline configuration: Reader<T>.() -> Unit): List<T>

Returns the file's records as a given type T according to the given configuration or throws an IllegalStateException when:

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

Returns the file's records as a given type according to the given configuration or throws an IllegalStateException when:

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

Returns the file's records as a given type Tasynchronously according to the given configuration or throws IllegalStateException when:

csvReaderOrNull
Link copied to clipboard
@SinceKotools(project = Project.Csv, version = "2.0")
inline suspend fun <T : Any> csvReaderOrNull(noinline configuration: Reader<T>.() -> Unit): List<T>?

Returns the file's records as a given type T according to the given configuration or returns null when:

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

Returns the file's records as a given type according to the given configuration or returns null when:

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

Returns the file's records as a given type Tasynchronously according to the given configuration or returns null when: