Task

public struct Task

Encapsulates launching a RxSwift powered command line task.

  • Create a new task.

    Declaration

    Swift

    public init(launchPath: String, arguments: [String] = [], workingDirectory: String? = nil, environment: [String: String]? = nil)

    Parameters

    launchPath

    The location of the executable.

    arguments

    The arguments to be passed to the executable.

    workingDirectory

    The working directory of the task. If not used, this will inherit from the parent process.

    environment

    The environment to launch the task with. If not used, this will inherit from the parent process.

  • Launch the Task.

    Declaration

    Swift

    public func launch(stdIn: Observable<Data>? = nil) -> Observable<TaskEvent>

    Parameters

    stdIn

    An optional Observable to provide stdin for the process. Defaults to nil.

  • A String describing the Task.

    Declaration

    Swift

    public var description: String
  • Whether or not two Tasks are equal.

    Declaration

    Swift

    public static func == (lhs: Task, rhs: Task) -> Bool