class Process[F[_], 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[F], outputTarget: ProcessOutputTarget[F, Out, OutResult], errorTarget: ProcessErrorTarget[F, Err, ErrResult], environmentVariables: Map[String, String], removedEnvironmentVariables: Set[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
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- val command: String
- val environmentVariables: Map[String, String]
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- val errorTarget: ProcessErrorTarget[F, Err, ErrResult]
- def finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def in(workingDirectory: Path): Process[F, 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[F]
- 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[F, Out, OutResult]
- val removedEnvironmentVariables: Set[String]
- 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(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def with(nameValuePair: (String, String)): Process[F, 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
- def without(name: String): Process[F, Out, Err, OutResult, ErrResult, IRS, ORS, ERS]
- val workingDirectory: Option[Path]