Skip to content

Commit

Permalink
Used openAsync in writeAllAsync (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
T45K authored Jan 20, 2024
1 parent c9d8800 commit 1ab3b68
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ actual class CsvWriter actual constructor(
* write all rows on assigned target file
*/
actual suspend fun writeAllAsync(rows: List<List<Any?>>, targetFileName: String, append: Boolean) {
open(targetFileName, append) { writeRows(rows) }
openAsync(targetFileName, append) { writeRows(rows) }
}

/**
Expand All @@ -124,7 +124,7 @@ actual class CsvWriter actual constructor(
* write all rows on assigned target file
*/
suspend fun writeAllAsync(rows: List<List<Any?>>, targetFile: File, append: Boolean = false) {
open(targetFile, append) { writeRows(rows) }
openAsync(targetFile, append) { writeRows(rows) }
}

/**
Expand All @@ -138,7 +138,7 @@ actual class CsvWriter actual constructor(
* write all rows on assigned output stream
*/
suspend fun writeAllAsync(rows: List<List<Any?>>, ops: OutputStream) {
open(ops) { writeRows(rows) }
openAsync(ops) { writeRows(rows) }
}

/**
Expand Down

0 comments on commit 1ab3b68

Please sign in to comment.