case class ProcessImplIO[F[_], O](command: String, arguments: List[String], workingDirectory: Option[Path], environmentVariables: Map[String, String], removedEnvironmentVariables: Set[String], outputRedirection: OutputRedirection[F], runOutputStream: (java.io.InputStream, Blocker, ContextShift[F]) ⇒ F[O], errorRedirection: OutputRedirection[F], runErrorStream: (java.io.InputStream, Blocker, ContextShift[F]) ⇒ F[Unit], inputRedirection: InputRedirection[F])(implicit concurrent: Concurrent[F]) extends Process[F, O, Unit] with RedirectableError[F, [γ$8$]ProcessImplIOE[F, O, γ$8$]] with ProcessConfiguration[F, ProcessImplIO[F, O]] with Product with Serializable
Process with bound input and output streams
- Alphabetic
- By Inheritance
- ProcessImplIO
- Serializable
- Serializable
- Product
- Equals
- ProcessConfiguration
- RedirectableError
- Process
- ProcessLike
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new ProcessImplIO(command: String, arguments: List[String], workingDirectory: Option[Path], environmentVariables: Map[String, String], removedEnvironmentVariables: Set[String], outputRedirection: OutputRedirection[F], runOutputStream: (java.io.InputStream, Blocker, ContextShift[F]) ⇒ F[O], errorRedirection: OutputRedirection[F], runErrorStream: (java.io.InputStream, Blocker, ContextShift[F]) ⇒ F[Unit], inputRedirection: InputRedirection[F])(implicit concurrent: Concurrent[F])
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
!>(path: Path): ProcessImplIOE[F, O, 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
-
def
!>(sink: Pipe[F, Byte, Unit]): ProcessImplIOE[F, O, 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
-
def
!>#[O](pipe: Pipe[F, Byte, O])(implicit arg0: Monoid[O]): ProcessImplIOE[F, O, 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
-
def
!>>(path: Path): ProcessImplIOE[F, O, 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
-
def
!>?[O](pipe: Pipe[F, Byte, O]): ProcessImplIOE[F, O, 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
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
appendErrorToFile(path: Path): ProcessImplIOE[F, O, 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
-
val
arguments: List[String]
- Definition Classes
- ProcessImplIO → Process
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
val
command: String
- Definition Classes
- ProcessImplIO → Process
-
implicit
val
concurrent: Concurrent[F]
- Definition Classes
- ProcessImplIO → RedirectableError → Process
-
def
connectError[R <: OutputRedirection[F], RE](target: R)(implicit outputRedirectionType: Aux[F, R, RE]): ProcessImplIOE[F, O, 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
- ProcessImplIO → RedirectableError
-
def
drainError[O](pipe: Pipe[F, Byte, O]): ProcessImplIOE[F, O, 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
-
val
environmentVariables: Map[String, String]
- Definition Classes
- ProcessImplIO → Process
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
val
errorRedirection: OutputRedirection[F]
- Definition Classes
- ProcessImplIO → Process
-
def
errorToFile(path: Path): ProcessImplIOE[F, O, 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
-
def
errorToFoldMonoid[O](pipe: Pipe[F, Byte, O])(implicit arg0: Monoid[O]): ProcessImplIOE[F, O, 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
-
def
errorToSink(sink: Pipe[F, Byte, Unit]): ProcessImplIOE[F, O, 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
-
def
errorToVector[O](pipe: Pipe[F, Byte, O]): ProcessImplIOE[F, O, 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
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
foldError[O, R](pipe: Pipe[F, Byte, O], init: R, fn: (R, O) ⇒ R): ProcessImplIOE[F, O, 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
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
in(workingDirectory: Path): ProcessImplIO[F, O]
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
- ProcessConfiguration
-
val
inputRedirection: InputRedirection[F]
- Definition Classes
- ProcessImplIO → Process
-
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
outputRedirection: OutputRedirection[F]
- Definition Classes
- ProcessImplIO → Process
-
val
removedEnvironmentVariables: Set[String]
- Definition Classes
- ProcessImplIO → Process
-
def
run(blocker: Blocker)(implicit runner: ProcessRunner[F]): F[ProcessResult[O, 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
- blocker
Execution context for blocking operations
- runner
The process runner to be used
- returns
the result of the finished process
- Definition Classes
- Process
-
val
runErrorStream: (java.io.InputStream, Blocker, ContextShift[F]) ⇒ F[Unit]
- Definition Classes
- ProcessImplIO → Process
-
val
runOutputStream: (java.io.InputStream, Blocker, ContextShift[F]) ⇒ F[O]
- Definition Classes
- ProcessImplIO → Process
-
def
selfCopy(command: String, arguments: List[String], workingDirectory: Option[Path], environmentVariables: Map[String, String], removedEnvironmentVariables: Set[String]): ProcessImplIO[F, O]
- Attributes
- protected
- Definition Classes
- ProcessImplIO → ProcessConfiguration
-
def
start(blocker: Blocker)(implicit runner: ProcessRunner[F]): Resource[F, Fiber[F, ProcessResult[O, 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).
- blocker
Execution context for blocking operations
- runner
The process runner to be used
- returns
a managed fiber representing the running process
- Definition Classes
- Process
-
def
startProcess(blocker: Blocker)(implicit runner: ProcessRunner[F]): F[RunningProcess[F, O, Unit]]
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.
- blocker
Execution context for blocking operations
- runner
The process runner to be used
- returns
interface for handling the running process
- Definition Classes
- Process
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
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
- @throws( ... ) @native()
-
def
with(nameValuePair: (String, String)): ProcessImplIO[F, O]
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
- ProcessConfiguration
-
def
withArguments(newArguments: List[String]): ProcessImplIO[F, O]
Replaces the arguments
Replaces the arguments
- newArguments
new list of arguments
- returns
returns a new process specification
- Definition Classes
- ProcessConfiguration
-
def
withCommand(newCommand: String): ProcessImplIO[F, O]
Replaces the command
Replaces the command
- newCommand
new value for the command to be executed
- returns
returns a new process specification
- Definition Classes
- ProcessConfiguration
-
def
without(name: String): ProcessImplIO[F, O]
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
- ProcessConfiguration
-
val
workingDirectory: Option[Path]
- Definition Classes
- ProcessImplIO → Process