Process class abstract final

Process::run(), pipe(), pool() and fake().

Import package:daravel/process.dart for it: the full barrel leaves it out, or every file that also uses dart:io's Process would stop compiling.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

fake<T>(Future<T> body(ProcessFake fake), {Map<String, ProcessResultData> stubs = const {}}) → Future<T>
Runs body with no real processes: stubs answer commands that match, where * is anything, and the others succeed with no output. It lives in the zone, so parallel tests do not see each other's.
pipe(List<List<String>> commands, {String? workingDirectory, Map<String, String>? environment, Duration? timeout = const Duration(seconds: 60)}) → Future<ProcessResultData>
Runs the commands one after another, each reading the output of the one before. It stops at the first failure and answers that result.
pool(List<List<String>> commands, {String? workingDirectory, Map<String, String>? environment, Duration? timeout = const Duration(seconds: 60), int concurrency = 4}) → Future<List<ProcessResultData>>
Runs commands at the same time, at most concurrency of them, and answers their results in the order given.
run(List<String> command, {String? workingDirectory, Map<String, String>? environment, Duration? timeout = const Duration(seconds: 60), String? input, void onOutput(ProcessOutputType type, String chunk)?}) → Future<ProcessResultData>
Runs command with no shell, so its arguments need no escaping. timeout kills it and throws a ProcessTimedOutException.