Packages

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)
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. syntax
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. implicit class ProcessNodeErrorRedirect[PN <: ProcessNode[_, _, _, _, NotRedirected]] extends AnyRef
  2. implicit class ProcessNodeInputRedirect[PN <: ProcessNode[_, _, NotRedirected, _, _]] extends AnyRef
  3. implicit class ProcessNodeOutputRedirect[PN <: ProcessNode[_, _, _, NotRedirected, _]] extends AnyRef
  4. implicit class ProcessOps[PN <: ProcessNode[_, _, _, _, _]] extends AnyRef