diff options
Diffstat (limited to 'src/library/scala/sys/process/ProcessIO.scala')
-rw-r--r-- | src/library/scala/sys/process/ProcessIO.scala | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/library/scala/sys/process/ProcessIO.scala b/src/library/scala/sys/process/ProcessIO.scala new file mode 100644 index 0000000000..b9ac156044 --- /dev/null +++ b/src/library/scala/sys/process/ProcessIO.scala @@ -0,0 +1,23 @@ +/* __ *\ +** ________ ___ / / ___ Scala API ** +** / __/ __// _ | / / / _ | (c) 2003-2010, LAMP/EPFL ** +** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** +** /____/\___/_/ |_/____/_/ | | ** +** |/ ** +\* */ + +package scala.sys +package process + +import processAliases._ + +/** Each method will be called in a separate thread.*/ +final class ProcessIO( + val writeInput: OutputStream => Unit, + val processOutput: InputStream => Unit, + val processError: InputStream => Unit +) { + def withOutput(process: InputStream => Unit): ProcessIO = new ProcessIO(writeInput, process, processError) + def withError(process: InputStream => Unit): ProcessIO = new ProcessIO(writeInput, processOutput, process) + def withInput(write: OutputStream => Unit): ProcessIO = new ProcessIO(write, processOutput, processError) +} |