Command
The command that create a child process.
Constructors
Constructor
new Command(execPath, options?): Command;
Parameters
| Parameter | Type |
|---|---|
|
|
|
Returns
Command
Accessors
execPath
Get Signature
get execPath(): string;
Returns
string
options
Get Signature
get options(): CommandOptions;
Returns
Methods
spawn()
spawn(): ChildProcess;
Spawn a child process.
Returns
It returns a child process.
Throws
Throws Error if failed to spawn the child process.
Example
try {
const cmd = new Rsvim.proc.Command("ls");
const child = cmd.spawn();
} catch (e) {
Rsvim.cmd.echo(`Failed to spawn child process: ${e}`);
}