public class CmdLine
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
CmdLine.Result
Returns the given result.
|
Constructor and Description |
---|
CmdLine() |
Modifier and Type | Method and Description |
---|---|
void |
cmd(java.io.File workingDir,
java.lang.String cmd)
Sets the working directory to the given dir, then executes the given command.
|
void |
cmd(java.lang.String cmd)
Executes the given command.
|
void |
copy(java.io.File src,
java.io.File dst)
Removes the given file or directory.
|
void |
echoCmd(boolean echoCmd)
Determines whether commands are echoed.
|
void |
echoOutput(boolean echoOutput)
Determines whether the output of commands are echoed.
|
void |
mv(java.io.File src,
java.io.File dst)
Removes the given file or directory.
|
void |
performActions()
Runs the commands that have been queued up.
|
void |
rm(java.io.File fileOrDir)
Removes the given file or directory.
|
void |
run(com.diffplug.common.base.Throwing.Runnable action)
Removes the given file or directory.
|
static CmdLine.Result |
runCmd(java.io.File directory,
java.lang.String cmd)
Runs the given command in the given directory.
|
static CmdLine.Result |
runCmd(java.io.File directory,
java.lang.String cmd,
boolean echoCmd,
boolean echoOutput)
Runs the given command in the given directory with the given echo setting.
|
static CmdLine.Result |
runCmd(java.lang.String cmd)
Runs the given command in the current working directory.
|
public void echoCmd(boolean echoCmd)
public void echoOutput(boolean echoOutput)
public void cmd(java.lang.String cmd)
public void cmd(java.io.File workingDir, java.lang.String cmd)
public void rm(java.io.File fileOrDir)
public void copy(java.io.File src, java.io.File dst)
public void mv(java.io.File src, java.io.File dst)
public void run(com.diffplug.common.base.Throwing.Runnable action)
public void performActions() throws java.lang.Throwable
java.lang.Throwable
public static CmdLine.Result runCmd(java.lang.String cmd) throws java.io.IOException
java.io.IOException
public static CmdLine.Result runCmd(java.io.File directory, java.lang.String cmd) throws java.io.IOException
java.io.IOException
public static CmdLine.Result runCmd(java.io.File directory, java.lang.String cmd, boolean echoCmd, boolean echoOutput) throws java.io.IOException
java.io.IOException