com.avito.utils.ProcessRunner.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of process Show documentation
Show all versions of process Show documentation
Collection of infrastructure libraries and gradle plugins of Avito Android project
package com.avito.utils
import com.avito.android.Result
import java.io.File
import java.time.Duration
public interface ProcessRunner {
/**
* @param command i.e. ls -la
*
* @return output команды, если exit code = 0
*/
public fun run(command: String, timeout: Duration): Result
public fun spawn(command: String, outputTo: File?): Process
public companion object {
public fun create(workingDirectory: File?): ProcessRunner = RealProcessRunner(workingDirectory)
}
}