read Lines
inline fun Path.readLines(charset: Charset = Charsets.UTF_8): List<String>
Content copied to clipboard
Reads the file content as a list of lines.
It's not recommended to use this function on huge files. For reading lines of a large file or a file of unknown size, use Path.forEachLine or Path.useLines.
Return
list of file lines.
Since Kotlin
1.5
Parameters
charset
character set to use for reading text, UTF-8 by default.