startAndReadAsString method

Future<String> startAndReadAsString (
  1. String executable,
  2. Iterable<String> arguments,
  3. {Encoding encoding: utf8,
  4. List<int> acceptedExitCodes: const [0]}
)

Implementation

Future<String> startAndReadAsString(
    String executable, Iterable<String> arguments,
    {Encoding encoding: utf8, List<int> acceptedExitCodes: const [0]}) async {
  var p = await start(executable, arguments);
  await p.expectExitCode(acceptedExitCodes);
  return await p.stdout.readAsString(encoding: encoding);
}