read method

  1. @override
Future<String> read(
  1. String absPath
)
override

Reads the UTF-8 contents of file absPath.

Implementation

@override
Future<String> read(String absPath) async {
  final r = await _run('cat -- ${_q(absPath)}');
  if (r.exitCode != 0) {
    throw WorkspaceException('cannot read $absPath: ${r.stderrText.trim()}');
  }
  return r.stdoutText;
}