NonInteractiveProcess class

Runs a process non-interactively to completion. It exposes the process output through convinience getters.

It is ideal to run shell or CLI commands that start and run to completion without interaction.

Constructors

NonInteractiveProcess(String executable, List<String> arguments, {String? workingDirectory, List<int>? successExitCodes, Encoding encoding = systemEncoding})

Properties

arguments List<String>
final
encoding Encoding
final
executable String
final
hashCode int
The hash code for this object.
no setterinherited
isSuccess bool
no setter
prettyCmd String
no setter
result ProcessResult
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stderr String
no setter
stdout String
no setter
workingDirectory String?
final

Methods

getOutputMessage() String
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
run() Future<void>
Starts the process or command and runs it non-interactively to completion.
runSync() → void
Starts the process or command and runs it non-interactively to completion. This is a synchronous call and will block until the child process terminates.
toString() String
A string representation of this object.
inherited

Operators

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