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
bodywith no real processes:stubsanswer 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< commands, {String? workingDirectory, Map<String> >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< commands, {String? workingDirectory, Map<String> >String, String> ? environment, Duration? timeout = const Duration(seconds: 60), int concurrency = 4}) → Future<List< ProcessResultData> > -
Runs
commandsat the same time, at mostconcurrencyof 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
commandwith no shell, so its arguments need no escaping.timeoutkills it and throws a ProcessTimedOutException.