mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-11 02:54:04 +09:00
csv reader can read file, stringify (not real save) and read the save itself wrote
This commit is contained in:
@@ -53,9 +53,10 @@ object CSVFetcher {
|
||||
@Throws(java.io.IOException::class)
|
||||
fun readCSVasString(path: String): String {
|
||||
net.torvald.terrarum.utils.CSVFetcher.csvString = StringBuffer()
|
||||
java.nio.file.Files.lines(java.nio.file.FileSystems.getDefault().getPath(path)).forEach(
|
||||
{ s -> net.torvald.terrarum.utils.CSVFetcher.csvString!!.append("$s\n") }
|
||||
)
|
||||
java.nio.file.Files.lines(java.nio.file.FileSystems.getDefault().getPath(path)).forEach {
|
||||
s -> net.torvald.terrarum.utils.CSVFetcher.csvString!!.append("$s\n")
|
||||
}
|
||||
|
||||
return net.torvald.terrarum.utils.CSVFetcher.csvString!!.toString()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user