openRead

Opens a File for read operations.

e.g.

"/path/to/my/file".toFile().openRead().use { s ->
    // read
}

Return

A FileStream.Read for read-only operations.

See also

Throws

If the File does not exist, if the File points to an existing directory, or if the filesystem threw a security exception.

UnsupportedOperationException

On Kotlin/JS-Browser.