0 votes
in Kotlin by
Give me name of the extension methods Kotlin provides to java.io.File

1 Answer

0 votes
by

below are the the extension methods Kotlin provides to java.io.File

  1. bufferedReader(): Use for reading contents of a file into BufferedReader
  2. readBytes() : Use for reading contents of file to ByteArray
  3. readText(): Use of reading contents of file to a single String
  4. forEachLine() : Use for reading a file line by line in Kotlin
  5. readLines(): Use to reading lines in file to List
...