class Process[Out, Err, OutResult, ErrResult, IRS <: RedirectionState, ORS <: RedirectionState, ERS <: RedirectionState] extends ProcessNode[Out, Err, IRS, ORS, ERS]
Represents a single system process
Do not construct Process directly. Use the companion object instead.
- Out
Output stream element type
- Err
Error stream element type
- OutResult
Result type of running the output stream
- ErrResult
Result type of running the error stream
- IRS
Input channel redirection state
- ORS
Output channel redirection state
- ERS
Error channel redirection state
- Alphabetic
- By Inheritance
- Process
- ProcessNode
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
Process(command: String, arguments: List[String], workingDirectory: Option[Path], inputSource: ProcessInputSource, outputTarget: ProcessOutputTarget[Out, OutResult], errorTarget: ProcessErrorTarget[Err, ErrResult], environmentVariables: Map[String, String])
- command
The command to start the process with
- arguments
List of arguments to be passed to the process
- workingDirectory
Working directory for the process
- inputSource
Redirection of the input channel
- outputTarget
Redirection of the output channel
- errorTarget
Redirection of the error channel
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val arguments: List[String]
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
- val command: String
- val environmentVariables: Map[String, String]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val errorTarget: ProcessErrorTarget[Err, ErrResult]
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
in(workingDirectory: Path): Process[Out, Err, OutResult, ErrResult, IRS, ORS, ERS]
Defines a process with an overwritten working directory
Defines a process with an overwritten working directory
Allows the following convenient syntax:
val process = Process("ls", List("-hal")) in (home / "tmp")
- workingDirectory
The working directory to run the process in
- returns
Returns a process with the working directory set
- val inputSource: ProcessInputSource
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val outputTarget: ProcessOutputTarget[Out, OutResult]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
with(nameValuePair: (String, String)): Process[Out, Err, OutResult, ErrResult, IRS, ORS, ERS]
Adds a custom environment variable to the defined process
Adds a custom environment variable to the defined process
Allows the following syntax:
val process = Process("sh", List("-c", "echo $X")) `with` ("X" -> "something")
- nameValuePair
The environment variable's name-value pair
- returns
Returns a process with the custom environment variable added
- val workingDirectory: Option[Path]