commonMain.com.xebia.functional.xef.io.CommandExecutor.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xef-filesystem Show documentation
Show all versions of xef-filesystem Show documentation
Building applications with LLMs through composability, in Kotlin and Scala
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