Expand description
File reading utilities for forward and tail (reverse) reading.
Port of Go’s pkg/util/readutil/readutil.go.
Provides line-based file reading with support for line counts, byte limits, line skipping, and progressive tail reading.
Constants§
- STOP_
REASON_ BOF - Stop reason: beginning of file reached.
- STOP_
REASON_ EOF - Stop reason: end of file reached.
- STOP_
REASON_ READ_ LIMIT - Stop reason: byte read limit reached.
Functions§
- read_
last_ n_ line_ offsets - Find the byte offsets of the last N lines in a seekable reader.
- read_
lines - Read lines forward from a reader.
- read_
tail_ lines - Read the last
line_countlines from a seekable reader with a byte limit. - read_
tail_ 🔒lines_ internal - Read the last
line_countlines from a seekable reader, optionally skipping the lastline_offsetlines.