class Command
source · line 39public class Command internal constructor(
/**
* The executable path selected for spawning.
*/
public val executable: Path,
arguments: Array<OsString> = [],
environment: Map<OsString, OsString> = currentEnvironment(),
/**
* The child's initial working directory.
*/
public val workingDirectory: Path = currentDirectory(),
/**
* The child standard-input routing.
*/
public val stdin: Stdio = Stdio.Inherit,
/**
* The child standard-output routing.
*/
public val stdout: Stdio = Stdio.Inherit,
/**
* The child standard-error routing when not merged.
*/
public val stderr: Stdio = Stdio.Inherit,
/**
* Whether stderr is redirected to the child's selected stdout.
*/
public val mergeError: Boolean = false
)
A process launch description with copied argument/environment data, an explicit working directory, and standard-stream routing. Arguments are passed directly without shell interpretation. Windows uses CRT argument encoding and leaves ordinary nonempty arguments unquoted. Scripts passed to an explicitly selected interpreter still follow its syntax.
Extensions
public fun Command.copy(configure: CommandBuilder.() -> Unit = {}): Command· scoop:scoop.platform:0.1.0@Unsafe public fun Command.spawnPtyNative(columns: Long, rows: Long, searchPath: Boolean = false): Ptr<Unit>· scoop:scoop.platform:0.1.0
property stdin
source · line 53public val stdin: Stdio = Stdio.Inherit
get: public read-only
The child standard-input routing.
property stderr
source · line 61public val stderr: Stdio = Stdio.Inherit
get: public read-only
The child standard-error routing when not merged.
property mergeError
source · line 65public val mergeError: Boolean = false
get: public read-only
Whether stderr is redirected to the child's selected stdout.
property stdout
source · line 57public val stdout: Stdio = Stdio.Inherit
get: public read-only
The child standard-output routing.
property environment
source · line 74public val environment: Map<OsString, OsString>
get: public read-only
The environment snapshot supplied to the child.
property executable
source · line 43public val executable: Path
get: public read-only
The executable path selected for spawning.
property arguments
source · line 70public val arguments: Array<OsString>
get: public read-only
The independent argument snapshot passed to the child.
property workingDirectory
source · line 49public val workingDirectory: Path = currentDirectory()
get: public read-only
The child's initial working directory.
function spawn
source · line 92public fun spawn(searchPath: Boolean = false): ChildProcess
Starts an owned child process. PATH lookup occurs only when searchPath is requested.
parameter searchPath
source · line 92searchPath: Boolean = false