Package pl.project13.core
Interface NativeGitProvider.ProcessRunner
-
- All Known Implementing Classes:
NativeGitProvider.JavaProcessRunner
- Enclosing class:
- NativeGitProvider
public static interface NativeGitProvider.ProcessRunner
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Stringrun(java.io.File directory, long nativeGitTimeoutInMs, java.lang.String command)Run a command and return the entire output as a String - naive, we know.booleanrunEmpty(java.io.File directory, long nativeGitTimeoutInMs, java.lang.String command)Run a command and return false if it contains at least one output line
-
-
-
Method Detail
-
run
java.lang.String run(java.io.File directory, long nativeGitTimeoutInMs, java.lang.String command) throws java.io.IOException, GitCommitIdExecutionExceptionRun a command and return the entire output as a String - naive, we know.- Parameters:
directory- the directory where the command should be executed innativeGitTimeoutInMs- the timeout in milliseconds before the command get's terminatedcommand- the command to execute- Returns:
- the output obtained from stdout by running the command
- Throws:
java.io.IOException- if any underlying IOError occurredGitCommitIdExecutionException- the command execution failed
-
runEmpty
boolean runEmpty(java.io.File directory, long nativeGitTimeoutInMs, java.lang.String command) throws java.io.IOException, GitCommitIdExecutionExceptionRun a command and return false if it contains at least one output line- Parameters:
directory- the directory where the command should be executed innativeGitTimeoutInMs- the timeout in milliseconds before the command get's terminatedcommand- the command to execute- Returns:
- false if the output of the command contains at least one line on stdout, true otherwise
- Throws:
java.io.IOException- if any underlying IOError occurredGitCommitIdExecutionException- the command execution failed
-
-