20
src/commonMain/kotlin/com/infendro/shell/Shell.kt
Normal file
20
src/commonMain/kotlin/com/infendro/shell/Shell.kt
Normal file
@@ -0,0 +1,20 @@
|
||||
package com.infendro.shell
|
||||
|
||||
object Shell {
|
||||
suspend fun run(
|
||||
command: Array<String>,
|
||||
directory: String? = null,
|
||||
): Result {
|
||||
return execute(command, directory)
|
||||
}
|
||||
|
||||
class Result(
|
||||
val code: Int,
|
||||
val value: String,
|
||||
)
|
||||
}
|
||||
|
||||
internal expect suspend fun execute(
|
||||
command: Array<String>,
|
||||
directory: String?,
|
||||
): Shell.Result
|
||||
Reference in New Issue
Block a user