read function

Progress read(
  1. String path, {
  2. String delim = '\n',
})

Reads lines from the file at path.

read('/var/log/syslog').forEach((line) => print(line));

delim sets the line delimiter which defaults to newline

If the file does not exists then a ReadException is thrown.

Implementation

Progress read(String path, {String delim = '\n'}) =>
    _Read().read(path, delim: delim);