useLines
inline fun <R> useLines(path: Path, maximumLineBytes: Int = 65536, block: (Sequence<String>) -> R): R(source)
Processes strict UTF-8 lines lazily and closes the snapshot reader after block, including failure and non-local return. The sequence can be traversed once and is usable only inside the block.
Return
the block result.
Parameters
maximumLineBytes
encoded bytes per line, excluding LF/CRLF/CR delimiters; zero permits empty lines.
block
processing called once, receiving a single-pass sequence. Unconsumed lines are not decoded.
Throws
for storage failures, invalid consumed UTF-8 or an oversized line.