object syntax
Implicit classes for working with simple and piped processes
All the operations are implemented for both simple Process objects and PipedProcess objects as well. Most of the operations encode information in the types of the processes as well.
The operations are implemented by various type classes and exposed through extension methods defined in the implicit classes in this object.
Examples
Starting simple and piped processes:
val echoProcess = Process("echo", List("This is an output")) val wordCountProcess = Process("wc", List("-w")) val combined = echoProcess | wordCountProcess for { echo1 <- Process("echo", List("Hello world")).start runningProcs <- combined.start (echo2, wordCount) = runningProcs } yield ()
Redirecting input, output and error channels:
val p1 = Process("echo", List("Hello world")) > (home / "tmp" / "out.txt") val p2 = Process("cat") < (home / "something") val p3 = Process("make") errorTo (home / "errors.log")
Piping:
val echoProcess = Process("echo", List("This is an output")) val wordCountProcess = Process("wc", List("-w")) val combined1 = echoProcess | wordCountProcess val customPipe: Pipe[IO, Byte, Byte] = ??? val combined2 = echoProcess.via(customPipe).to(wordCountProcess)
- Alphabetic
- By Inheritance
- syntax
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- implicit class ProcessNodeErrorRedirect[PN <: ProcessNode[_, _, _, _, NotRedirected]] extends AnyRef
- implicit class ProcessNodeInputRedirect[PN <: ProcessNode[_, _, NotRedirected, _, _]] extends AnyRef
- implicit class ProcessNodeOutputRedirect[PN <: ProcessNode[_, _, _, NotRedirected, _]] extends AnyRef
- implicit class ProcessOps[PN <: ProcessNode[_, _, _, _, _]] extends AnyRef
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
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
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()
-
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()
-
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( ... )