Class DiffCommand
java.lang.Object
org.variantsync.studies.evolution.simulation.shell.ShellCommand
org.variantsync.studies.evolution.simulation.shell.DiffCommand
Represents a shell 'diff' command that can be executed using a ShellExecutor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.variantsync.functjonal.Result<List<String>,
ShellException> interpretResult
(int code, List<String> output) Interpret the result code returned from a shell commandnewFile()
Treat absent files as emptyString[]
parts()
Return the String parts that define and configure the command execution (e.g., ["echo", "Hello World"])static DiffCommand
Recommended
(Path pathA, Path pathB) DiffCommand configured as recommended by the documentation in 'patch' (i.e.Recursively compare any subdirectories foundtext()
Treat all files as texttoString()
unified()
Output three lines of unified context
-
Constructor Details
-
DiffCommand
-
-
Method Details
-
Recommended
DiffCommand configured as recommended by the documentation in 'patch' (i.e. 'man patch')- Parameters:
pathA
- The path to the source filepathB
- The path to the target file- Returns:
- A configured DiffCommand
-
parts
Description copied from class:ShellCommand
Return the String parts that define and configure the command execution (e.g., ["echo", "Hello World"])- Specified by:
parts
in classShellCommand
- Returns:
- the parts of the shell command.
-
newFile
Treat absent files as empty- Returns:
- this command
-
text
Treat all files as text- Returns:
- this command
-
unified
Output three lines of unified context- Returns:
- this command
-
recursive
Recursively compare any subdirectories found- Returns:
- this command
-
toString
- Overrides:
toString
in classShellCommand
-
interpretResult
public org.variantsync.functjonal.Result<List<String>,ShellException> interpretResult(int code, List<String> output) Description copied from class:ShellCommand
Interpret the result code returned from a shell command- Overrides:
interpretResult
in classShellCommand
- Parameters:
code
- the code that is to be parsed- Returns:
- the result
-