All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.com.xebia.functional.xef.io.CommandExecutor.kt Maven / Gradle / Ivy

The newest version!
package com.xebia.functional.xef.io


data class ExecuteCommandOptions(
  val directory: String,
  val abortOnError: Boolean,
  val redirectStderr: Boolean,
  val trim: Boolean
)

enum class Platform {
  LINUX, MACOS, WINDOWS,
}

interface CommandExecutor {
  suspend fun executeCommandAndCaptureOutput(
    command: List,
    options: ExecuteCommandOptions
  ): String

  suspend fun pwd(options: ExecuteCommandOptions): String

  suspend fun findExecutable(executable: String): String

  companion object
}

expect val CommandExecutor.Companion.DEFAULT: CommandExecutor




© 2015 - 2024 Weber Informatics LLC | Privacy Policy