$ class
A host platform process that run non-interactively to completion.
Constructors
- $(String cmd, [ShellConfig shellConfig = const base.ShellConfig()])
Properties
-
exitCode
→ Future<
int> -
Exit code of the process.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
pid
→ Future<
int> -
Process id of the process.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
stderr
→ Future<
Uint8List> -
Raw stderr in bytes.
no setter
-
stderrAsString
→ Future<
String> -
stderr as a
String
.no setter -
stdout
→ Future<
Uint8List> -
Raw stdout in bytes.
no setter
-
stdoutAsString
→ Future<
String> -
stdout as a
String
. Prefer text if you need to check the exit code.no setter
Methods
-
call<
T extends Object> () → Future< T> -
Converts into the desired type
T
. Will throw a ShellException if the shell process did not exit with 0 as the exit code. Will throw a ShellConversionException if cannot convert to the desired typeT
. -
lines<
T extends Object> () → Future< List< T> > -
Splits the output by newlines and converts each split into the desired type
T
. Will throw a ShellException if the shell process did not exit with 0 as the exit code. Will throw a ShellConversionException if cannot convert to the desired typeT
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
spaces<
T extends Object> () → Future< List< T> > -
Splits the output by spaces and converts each split into the desired type
T
. Will throw a ShellException if the shell process did not exit with 0 as the exit code. Will throw a ShellConversionException if cannot convert to the desired typeT
. -
text(
) → Future< String> - Returns the shells stdout with any trailing newline stripped. Will throw a ShellException if the shell process did not exit with 0 as the exit code.
-
toString(
) → String -
A string representation of this object.
inherited
-
whitespaces<
T extends Object> () → Future< List< T> > -
Splits the output by whitespaces and converts each split into the desired type
T
. Will throw a ShellException if the shell process did not exit with 0 as the exit code. Will throw a ShellConversionException if cannot convert to the desired typeT
.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator >(
File file) → Future< void> - Writes to file. Platform independent. e.g.
-
operator >>(
File file) → Future< void> - Appends to file. Platform independent. e.g.