Command class

Create a child process.

If any stdio options are not set to "piped", accessing the corresponding field on the Command or its CommandOutput will throw a TypeError.

If stdin is set to "piped", the stdin {@linkcode WritableStream} needs to be closed manually.

Available extensions
Annotations
  • @JS()
  • @staticInterop

Constructors

Command.new(Object command, [CommandOptions? options])
factory

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
output() Future<CommandOutput>

Available on Command, provided by the Command$Typings extension

Executes the {@linkcode Deno.Command}, waiting for it to finish and collecting all of its output. If spawn() was called, calling this function will collect the remaining output.
outputSync() CommandOutput

Available on Command, provided by the Command$Typings extension

Synchronously executes the {@linkcode Deno.Command}, waiting for it to finish and collecting all of its output.
spawn() ChildProcess

Available on Command, provided by the Command$Typings extension

Spawns a streamable subprocess, allowing to use the other methods.
toString() String
A string representation of this object.
inherited

Operators

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