Writer

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

Types

Records
Link copied to clipboard
interface Records<in T : Any>

Configurable object responsible for defining the records to write.

Functions

records
Link copied to clipboard
abstract infix fun records(configuration: Writer.Records<T>.() -> Unit)

Required function that defines the records to write.

Properties

file
Link copied to clipboard
abstract var file: String

Required property for targeting a file.

folder
Link copied to clipboard
abstract var folder: String

Optional property for targeting a folder containing the file.

overwrite
Link copied to clipboard
abstract var overwrite: Boolean

Optional flag for overwriting the file's content.

separator
Link copied to clipboard
abstract var separator: Separator

Optional property for setting the file content's separator.