head function

Progress head(
  1. String path,
  2. int lines
)

Returns count lines from the file at path.

head('/var/log/syslog', 10).forEach((line) => print(line));

Throws a HeadException exception if path is not a file.

Implementation

Progress head(String path, int lines) => _Head().head(path, lines);