From 1ab3b68b86432556beed9c1b8e553ee5a78087e0 Mon Sep 17 00:00:00 2001 From: Tasuku Nakagawa <38446259+T45K@users.noreply.github.com> Date: Sat, 20 Jan 2024 10:32:04 +0900 Subject: [PATCH] Used `openAsync` in `writeAllAsync` (#134) --- .../com/github/doyaaaaaken/kotlincsv/client/CsvWriter.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/jvmMain/kotlin/com/github/doyaaaaaken/kotlincsv/client/CsvWriter.kt b/src/jvmMain/kotlin/com/github/doyaaaaaken/kotlincsv/client/CsvWriter.kt index 0a57940..c3adf1a 100644 --- a/src/jvmMain/kotlin/com/github/doyaaaaaken/kotlincsv/client/CsvWriter.kt +++ b/src/jvmMain/kotlin/com/github/doyaaaaaken/kotlincsv/client/CsvWriter.kt @@ -110,7 +110,7 @@ actual class CsvWriter actual constructor( * write all rows on assigned target file */ actual suspend fun writeAllAsync(rows: List>, targetFileName: String, append: Boolean) { - open(targetFileName, append) { writeRows(rows) } + openAsync(targetFileName, append) { writeRows(rows) } } /** @@ -124,7 +124,7 @@ actual class CsvWriter actual constructor( * write all rows on assigned target file */ suspend fun writeAllAsync(rows: List>, targetFile: File, append: Boolean = false) { - open(targetFile, append) { writeRows(rows) } + openAsync(targetFile, append) { writeRows(rows) } } /** @@ -138,7 +138,7 @@ actual class CsvWriter actual constructor( * write all rows on assigned output stream */ suspend fun writeAllAsync(rows: List>, ops: OutputStream) { - open(ops) { writeRows(rows) } + openAsync(ops) { writeRows(rows) } } /**