$ class
A host platform process that run non-interactively to completion.
Constructors
- $(String cmd, [ShellConfig shellConfig = const base.ShellConfig()])
Properties
- exitCode → int
-
Exit code of the process.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- pid → int
-
Process id of the process.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stderr → Uint8List
-
Raw stderr in bytes.
no setter
- stderrAsString → String
-
stderr as a String.
no setter
- stdout → Uint8List
-
Raw stdout in bytes.
no setter
- stdoutAsString → String
-
stdout as a String. Prefer text if you need to check the exit code.
no setter
Methods
-
call<
T extends Object> () → 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 ShellResultConversionException if cannot convert to the desired typeT
. -
lines<
T extends Object> () → 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 ShellResultConversionException 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> () → 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 ShellResultConversionException if cannot convert to the desired typeT
. -
text(
) → 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> () → 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 ShellResultConversionException if cannot convert to the desired typeT
.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator >(
File file) → void - Writes to file. Platform independent. e.g.
-
operator >>(
File file) → void - Appends to file. Platform independent. e.g.