Name |
Ceylon Process Platform Module |
---|---|
Category |
SDK
The Ceylon SDK |
Backends | JVM |
Maven coordinates | org.ceylon-lang:ceylon.process |
Compatible Ceylon release |
JVM: 1.2.x, 1.3.x (latest) |
Published | Aug 21, 2017 |
Stats |
Downloads (JVM): 464 Source downloads: 518 |
Authors |
Gavin King |
Description |
API for running native commands in a child process.
Clients simply create Process process = createProcess { command = "ls"; arguments = ["-l"]; path = home; }; By default, the standard input, output, and error
streams of the new child process are piped to and
from the current process by exposing a if (is Reader reader = process.output) { while (exists line = reader.readLine()) { print(line); } } The standard input, output, and error streams may be
redirected by specifying an Process process = createProcess { command = "ls"; arguments = ["-l"]; path = home; output = OverwriteFileOutput { path = home.childPath("out.txt"); }; error = AppendFileOutput { path = home.childPath("err.txt"); }; }; The objects Process process = createProcess { command = "ls"; arguments = ["-l"]; path = home; output = currentOutput; error = currentError; }; To wait for the child process to terminate, call
the |
Dependencies |
ceylon.file/1.3.3
shared
java.base/7 JDK
|
Usage |
import ceylon.process "1.3.3"; |
Module links |
Members Imported By Home Code repository Issue tracker Browse Download .car No .js archive Download source archive Download module documentation View API documentation |