lineSequence

Returns a sequence of corresponding file lines.

Note: the caller must close the underlying BufferedReader when the iteration is finished, as the user may not complete the iteration loop (e.g. using a method like find() or any() on the iterator may terminate the iteration early).

We suggest you try the method useLines instead which closes the stream when the processing is complete.

Since Kotlin

1.0

Return

a sequence of corresponding file lines. The sequence returned can be iterated only once.