readLines

fun File.readLines(charset: Charset = Charsets.UTF_8): List<String>(source)

Reads the file content as a list of lines.

Do not use this function for huge files.

Since Kotlin

1.0

Return

list of file lines.

Parameters

charset

character set to use. By default uses UTF-8 charset.


Reads this reader content as a list of lines.

Do not use this function for huge files.

Since Kotlin

1.0