Packages

  • package root
    Definition Classes
    root
  • package io
    Definition Classes
    root
  • package github
    Definition Classes
    io
  • package vigoo
    Definition Classes
    github
  • package prox

    Provides classes to work with system processes in a type safe way.

    Provides classes to work with system processes in a type safe way.

    Refer to the user guide for more information.

    A process to be executed is represented by the Process trait. Once it has finished running the results are in ProcessResult. We call a group of processes attached together a process group, represented by ProcessGroup, its result is described by ProcessGroupResult.

    Redirection of input, output and error is enabled by the RedirectableInput, RedirectableOutput and RedirectableError trait for single processes, and the RedirectableErrors trait for process groups.

    Processes and process groups are executed by a ProcessRunner, the default implementation is called JVMProcessRunner.

    Definition Classes
    vigoo
  • trait ProcessModule extends AnyRef
    Definition Classes
    prox
  • object Process
    Definition Classes
    ProcessModule
  • ProcessImpl
  • ProcessImplE
  • ProcessImplI
  • ProcessImplIE
  • ProcessImplIO
  • ProcessImplIOE
  • ProcessImplO
  • ProcessImplOE

case class ProcessImplI(command: String, arguments: List[String], workingDirectory: Option[Path], environmentVariables: Map[String, String], removedEnvironmentVariables: Set[String], outputRedirection: Prox.OutputRedirection, runOutputStream: (InputStream) => Prox.ProxIO[Unit], errorRedirection: Prox.OutputRedirection, runErrorStream: (InputStream) => Prox.ProxIO[Unit], inputRedirection: Prox.InputRedirection) extends Prox.Process[Unit, Unit] with Prox.RedirectableOutput[[α$12$]ProcessImplIO[α$12$]] with Prox.RedirectableError[[α$13$]ProcessImplIE[α$13$]] with Product with Serializable

Process with bound input streams

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ProcessImplI
  2. Serializable
  3. Product
  4. Equals
  5. RedirectableError
  6. RedirectableOutput
  7. Process
  8. ProcessConfiguration
  9. ProcessLikeConfiguration
  10. ProcessLike
  11. AnyRef
  12. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new ProcessImplI(command: String, arguments: List[String], workingDirectory: Option[Path], environmentVariables: Map[String, String], removedEnvironmentVariables: Set[String], outputRedirection: Prox.OutputRedirection, runOutputStream: (InputStream) => Prox.ProxIO[Unit], errorRedirection: Prox.OutputRedirection, runErrorStream: (InputStream) => Prox.ProxIO[Unit], inputRedirection: Prox.InputRedirection)

Type Members

  1. type Self = ProcessImplI

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. def !>(path: Path): ProcessImplIE[Unit]

    Redirects the error output to a file natively

    Redirects the error output to a file natively

    An alias for errorToFile

    path

    Target file path

    returns

    Returns a new process with its error output redirected and its error redirection capability removed.

    Definition Classes
    RedirectableError
  3. def !>(sink: Prox.ProxSink[Byte]): ProcessImplIE[Unit]

    Redirects the error output to a sink.

    Redirects the error output to a sink.

    The process error output type will be Unit. An alias for errorToSink

    sink

    Target sink

    returns

    Returns a new process with its error output redirected and its error redirection capability removed.

    Definition Classes
    RedirectableError
  4. def !>#[O](pipe: Prox.ProxPipe[Byte, O])(implicit arg0: Prox.ProxMonoid[O]): ProcessImplIE[O]

    Redirects the error output to a pipe and folds its output with a monoid instance.

    Redirects the error output to a pipe and folds its output with a monoid instance.

    The process error output type will be the same as the pipe's output type. An alias for errorToFoldMonoid

    O

    Output type of the pipe. Must have a monoid instance.

    pipe

    Target pipe

    returns

    Returns a new process with its error output redirected and its error redirection capability removed.

    Definition Classes
    RedirectableError
  5. def !>>(path: Path): ProcessImplIE[Unit]

    Redirects the error output to a file natively in append mode

    Redirects the error output to a file natively in append mode

    An alias for appendErrorToFile

    path

    Target file path

    returns

    Returns a new process with its error output redirected and its error redirection capability removed.

    Definition Classes
    RedirectableError
  6. def !>?[O](pipe: Prox.ProxPipe[Byte, O]): ProcessImplIE[Vector[O]]

    Redirects the error output to a pipe and collects its output to a vector

    Redirects the error output to a pipe and collects its output to a vector

    The process error output type will be a vector of the pipe's output type. An alias for errorToVector

    O

    Output type of the pipe

    pipe

    Target pipe

    returns

    Returns a new process with its error output redirected and its error redirection capability removed.

    Definition Classes
    RedirectableError
  7. final def ##: Int
    Definition Classes
    AnyRef → Any
  8. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  9. def >(path: Path): ProcessImplIO[Unit]

    Redirects the output to a file natively

    Redirects the output to a file natively

    An alias for toFile

    path

    Target file path

    returns

    Returns a new process or process group with its output redirected and its output redirection capability removed.

    Definition Classes
    RedirectableOutput
  10. def >(sink: Prox.ProxSink[Byte]): ProcessImplIO[Unit]

    Redirects the output to a sink.

    Redirects the output to a sink.

    The process output type will be Unit. An alias for toSink

    sink

    Target sink

    returns

    Returns a new process or process group with its output redirected and its output redirection capability removed.

    Definition Classes
    RedirectableOutput
  11. def >#[O](pipe: Prox.ProxPipe[Byte, O])(implicit arg0: Prox.ProxMonoid[O]): ProcessImplIO[O]

    Redirects the output to a pipe and folds its output with a monoid instance.

    Redirects the output to a pipe and folds its output with a monoid instance.

    The process output type will be the same as the pipe's output type. An alias for toFoldMonoid

    O

    Output type of the pipe. Must have a monoid instance.

    pipe

    Target pipe

    returns

    Returns a new process or process group with its output redirected and its output redirection capability removed.

    Definition Classes
    RedirectableOutput
  12. def >>(path: Path): ProcessImplIO[Unit]

    Redirects the output to a file natively in append mode

    Redirects the output to a file natively in append mode

    An alias for appendToFile

    path

    Target file path

    returns

    Returns a new process or process group with its output redirected and its output redirection capability removed.

    Definition Classes
    RedirectableOutput
  13. def >?[O](pipe: Prox.ProxPipe[Byte, O]): ProcessImplIO[Vector[O]]

    Redirects the output to a pipe and collects its output to a vector

    Redirects the output to a pipe and collects its output to a vector

    The process output type will be a vector of the pipe's output type. An alias for toVector

    O

    Output type of the pipe

    pipe

    Target pipe

    returns

    Returns a new process or process group with its output redirected and its output redirection capability removed.

    Definition Classes
    RedirectableOutput
  14. def appendErrorToFile(path: Path): ProcessImplIE[Unit]

    Redirects the error output to a file natively in append mode

    Redirects the error output to a file natively in append mode

    An alias for !>>

    path

    Target file path

    returns

    Returns a new process with its error output redirected and its error redirection capability removed.

    Definition Classes
    RedirectableError
  15. def appendToFile(path: Path): ProcessImplIO[Unit]

    Redirects the output to a file natively in append mode

    Redirects the output to a file natively in append mode

    An alias for >>

    path

    Target file path

    returns

    Returns a new process or process group with its output redirected and its output redirection capability removed.

    Definition Classes
    RedirectableOutput
  16. def applyConfiguration(workingDirectory: Option[Path], environmentVariables: Map[String, String], removedEnvironmentVariables: Set[String]): Self
    Attributes
    protected
    Definition Classes
    ProcessConfigurationProcessLikeConfiguration
  17. val arguments: List[String]
    Definition Classes
    ProcessImplIProcess
  18. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  19. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  20. val command: String
    Definition Classes
    ProcessImplIProcess
  21. def connectError[R <: Prox.OutputRedirection, RE](target: R)(implicit outputRedirectionType: Aux[R, RE]): ProcessImplIE[RE]

    The low level operation to attach an error output to a process

    The low level operation to attach an error output to a process

    Use one of the other methods of this trait for convenience. This is the place where the output type gets calculated with a helper type class called OutputRedirectionType which implements the type level computation for figuring out E.

    R

    Error output redirection type

    target

    Redirection target

    outputRedirectionType

    Helper for dependent error output type

    returns

    Returns a new process with its error output redirected and its error redirection capability removed.

    Definition Classes
    ProcessImplIRedirectableError
  22. def connectOutput[R <: Prox.OutputRedirection, RO](target: R)(implicit outputRedirectionType: Aux[R, RO]): ProcessImplIO[RO]

    The low level operation to attach an output to a process

    The low level operation to attach an output to a process

    Use one of the other methods of this trait for convenience. This is the place where the output type gets calculated with a helper type class called OutputRedirectionType which implements the type level computation for figuring out O.

    R

    Output redirection type

    target

    Redirection target

    outputRedirectionType

    Helper for dependent output type

    returns

    Returns a new process or process group with its output redirected and its output redirection capability removed.

    Definition Classes
    ProcessImplIRedirectableOutput
  23. def drainError[O](pipe: Prox.ProxPipe[Byte, O]): ProcessImplIE[Unit]

    Redirects the error output to a pipe and drains it regardless of its output type.

    Redirects the error output to a pipe and drains it regardless of its output type.

    The process error output type will be Unit.

    O

    Output type of the pipe

    pipe

    Target pipe

    returns

    Returns a new process with its error output redirected and its error redirection capability removed.

    Definition Classes
    RedirectableError
  24. def drainOutput[O](pipe: Prox.ProxPipe[Byte, O]): ProcessImplIO[Unit]

    Redirects the output to a pipe and drains it regardless of its output type.

    Redirects the output to a pipe and drains it regardless of its output type.

    The process output type will be Unit.

    O

    Output type of the pipe

    pipe

    Target pipe

    returns

    Returns a new process or process group with its output redirected and its output redirection capability removed.

    Definition Classes
    RedirectableOutput
  25. val environmentVariables: Map[String, String]
  26. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  27. val errorRedirection: Prox.OutputRedirection
    Definition Classes
    ProcessImplIProcess
  28. def errorToFile(path: Path): ProcessImplIE[Unit]

    Redirects the error output to a file natively

    Redirects the error output to a file natively

    An alias for !>

    path

    Target file path

    returns

    Returns a new process with its error output redirected and its error redirection capability removed.

    Definition Classes
    RedirectableError
  29. def errorToFoldMonoid[O](pipe: Prox.ProxPipe[Byte, O])(implicit arg0: Prox.ProxMonoid[O]): ProcessImplIE[O]

    Redirects the error output to a pipe and folds its output with a monoid instance.

    Redirects the error output to a pipe and folds its output with a monoid instance.

    The process error output type will be the same as the pipe's output type. An alias for !>#

    O

    Output type of the pipe. Must have a monoid instance.

    pipe

    Target pipe

    returns

    Returns a new process with its error output redirected and its error redirection capability removed.

    Definition Classes
    RedirectableError
  30. def errorToSink(sink: Prox.ProxSink[Byte]): ProcessImplIE[Unit]

    Redirects the error output to a sink.

    Redirects the error output to a sink.

    The process error output type will be Unit. An alias for !>

    sink

    Target sink

    returns

    Returns a new process with its error output redirected and its error redirection capability removed.

    Definition Classes
    RedirectableError
  31. def errorToVector[O](pipe: Prox.ProxPipe[Byte, O]): ProcessImplIE[Vector[O]]

    Redirects the error output to a pipe and collects its output to a vector

    Redirects the error output to a pipe and collects its output to a vector

    The process error output type will be a vector of the pipe's output type. An alias for !>?

    O

    Output type of the pipe

    pipe

    Target pipe

    returns

    Returns a new process with its error output redirected and its error redirection capability removed.

    Definition Classes
    RedirectableError
  32. def foldError[O, R](pipe: Prox.ProxPipe[Byte, O], init: R, fn: (R, O) => R): ProcessImplIE[R]

    Redirects the error output to a pipe and folds it with a custom function.

    Redirects the error output to a pipe and folds it with a custom function.

    The process error output type will be R.

    O

    Output type of the pipe

    R

    Result type of the fold

    pipe

    Target pipe

    init

    The initial value for the fold

    fn

    The fold function

    returns

    Returns a new process with its error output redirected and its error redirection capability removed.

    Definition Classes
    RedirectableError
  33. def foldOutput[O, R](pipe: Prox.ProxPipe[Byte, O], init: R, fn: (R, O) => R): ProcessImplIO[R]

    Redirects the output to a pipe and folds it with a custom function.

    Redirects the output to a pipe and folds it with a custom function.

    The process output type will be R.

    O

    Output type of the pipe

    R

    Result type of the fold

    pipe

    Target pipe

    init

    The initial value for the fold

    fn

    The fold function

    returns

    Returns a new process or process group with its output redirected and its output redirection capability removed.

    Definition Classes
    RedirectableOutput
  34. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  35. def in(workingDirectory: Path): Self

    Changes the working directory of the process

    Changes the working directory of the process

    workingDirectory

    the working directory

    returns

    a new process with the working directory set

    Definition Classes
    ProcessLikeConfiguration
  36. def inInheritedWorkingDirectory(): Self

    Use the inherited working directory of the process instead of an explicit one

    Use the inherited working directory of the process instead of an explicit one

    returns

    a new process with the working directory cleared

    Definition Classes
    ProcessLikeConfiguration
  37. val inputRedirection: Prox.InputRedirection
    Definition Classes
    ProcessImplIProcess
  38. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  39. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  40. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  41. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  42. val outputRedirection: Prox.OutputRedirection
    Definition Classes
    ProcessImplIProcess
  43. def productElementNames: Iterator[String]
    Definition Classes
    Product
  44. val removedEnvironmentVariables: Set[String]
  45. def run[Info]()(implicit runner: Prox.ProcessRunner[Info]): Prox.ProxIO[Prox.ProcessResult[Unit, Unit]]

    Starts the process asynchronously and blocks the execution until it is finished

    Starts the process asynchronously and blocks the execution until it is finished

    runner

    The process runner to be used

    returns

    the result of the finished process

    Definition Classes
    Process
  46. val runErrorStream: (InputStream) => Prox.ProxIO[Unit]
    Definition Classes
    ProcessImplIProcess
  47. val runOutputStream: (InputStream) => Prox.ProxIO[Unit]
    Definition Classes
    ProcessImplIProcess
  48. def selfCopy(command: String, arguments: List[String], workingDirectory: Option[Path], environmentVariables: Map[String, String], removedEnvironmentVariables: Set[String]): ProcessImplI
    Attributes
    protected
    Definition Classes
    ProcessImplIProcessConfiguration
  49. def start[Info]()(implicit runner: Prox.ProcessRunner[Info]): Prox.ProxResource[Prox.ProxFiber[Prox.ProcessResult[Unit, Unit]]]

    Starts the process asynchronously and returns a closeable fiber representing it

    Starts the process asynchronously and returns a closeable fiber representing it

    Joining the fiber waits for the process to be terminated. Canceling the fiber terminates the process normally (with SIGTERM).

    runner

    The process runner to be used

    returns

    a managed fiber representing the running process

    Definition Classes
    Process
  50. def startProcess[Info]()(implicit runner: Prox.ProcessRunner[Info]): Prox.ProxIO[Prox.RunningProcess[Unit, Unit, Info]]

    Starts the process asynchronously and returns the RunningProcess interface for it

    Starts the process asynchronously and returns the RunningProcess interface for it

    This is the most advanced way to start processes. See start and run as alternatives.

    Info

    The runner-specific process info type

    runner

    The process runner to be used

    returns

    interface for handling the running process

    Definition Classes
    Process
  51. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  52. def toFile(path: Path): ProcessImplIO[Unit]

    Redirects the output to a file natively

    Redirects the output to a file natively

    An alias for >

    path

    Target file path

    returns

    Returns a new process or process group with its output redirected and its output redirection capability removed.

    Definition Classes
    RedirectableOutput
  53. def toFoldMonoid[O](pipe: Prox.ProxPipe[Byte, O])(implicit arg0: Prox.ProxMonoid[O]): ProcessImplIO[O]

    Redirects the output to a pipe and folds its output with a monoid instance.

    Redirects the output to a pipe and folds its output with a monoid instance.

    The process output type will be the same as the pipe's output type. An alias for >#

    O

    Output type of the pipe. Must have a monoid instance.

    pipe

    Target pipe

    returns

    Returns a new process or process group with its output redirected and its output redirection capability removed.

    Definition Classes
    RedirectableOutput
  54. def toSink(sink: Prox.ProxSink[Byte]): ProcessImplIO[Unit]

    Redirects the output to a sink.

    Redirects the output to a sink.

    The process output type will be Unit. An alias for >

    sink

    Target sink

    returns

    Returns a new process or process group with its output redirected and its output redirection capability removed.

    Definition Classes
    RedirectableOutput
  55. def toVector[O](pipe: Prox.ProxPipe[Byte, O]): ProcessImplIO[Vector[O]]

    Redirects the output to a pipe and collects its output to a vector

    Redirects the output to a pipe and collects its output to a vector

    The process output type will be a vector of the pipe's output type. An alias for >?

    O

    Output type of the pipe

    pipe

    Target pipe

    returns

    Returns a new process or process group with its output redirected and its output redirection capability removed.

    Definition Classes
    RedirectableOutput
  56. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  57. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  58. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  59. def with(nameValuePair: (String, String)): Self

    Adds an environment variable to the process

    Adds an environment variable to the process

    nameValuePair

    A pair of name and value

    returns

    a new process with the working directory set

    Definition Classes
    ProcessLikeConfiguration
  60. def withArguments(newArguments: List[String]): Self

    Replaces the arguments

    Replaces the arguments

    newArguments

    new list of arguments

    returns

    returns a new process specification

    Definition Classes
    ProcessConfiguration
  61. def withCommand(newCommand: String): Self

    Replaces the command

    Replaces the command

    newCommand

    new value for the command to be executed

    returns

    returns a new process specification

    Definition Classes
    ProcessConfiguration
  62. def without(name: String): Self

    Removes an environment variable from the process

    Removes an environment variable from the process

    Usable to remove variables inherited from the parent process.

    name

    Name of the environment variable

    returns

    a new process with the working directory set

    Definition Classes
    ProcessLikeConfiguration
  63. val workingDirectory: Option[Path]

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Prox.RedirectableError[[α$13$]ProcessImplIE[α$13$]]

Inherited from Prox.RedirectableOutput[[α$12$]ProcessImplIO[α$12$]]

Inherited from Prox.Process[Unit, Unit]

Inherited from ProcessLike

Inherited from AnyRef

Inherited from Any

Ungrouped