You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
440 B
Kotlin
15 lines
440 B
Kotlin
package me.eater.hefbrug.access
|
|
|
|
interface AccessSkeleton {
|
|
fun id(): String
|
|
suspend fun execute(
|
|
vararg command: String,
|
|
environment: Map<String, String> = mapOf(),
|
|
workingDirectory: String? = null
|
|
): ExecutionOutput
|
|
|
|
suspend fun exists(fileName: String, type: FileType = FileType.Anything): Boolean {
|
|
val res = execute("test", type.switch, fileName)
|
|
return res.exitCode == 0
|
|
}
|
|
} |