klyn.io.FilePath.readPrefix
method
public readPrefix(maxBytes as Int) as String:
Description

Reads at most the first maxBytes bytes from this file.

This is useful for tools that need a bounded preview of large text files.

Parameters
  • maxBytes Maximum number of bytes to read.
Returns

Prefix text, trimmed to a valid UTF-8 boundary when possible.