| Modifier and Type | Field and Description |
|---|---|
private LogWrapper |
log |
| Constructor and Description |
|---|
CommandExecutor(LogWrapper log) |
| Modifier and Type | Method and Description |
|---|---|
private String |
execute(File workingDir,
File pathToExecutable,
String command,
String[] args)
Execute
command with arguments args
in the working directory workingDir. |
(package private) String |
execute(File workingDir,
File pathToExecutable,
String command,
String[] args,
File... resFile)
Logging:
EEX01: return code other than 0.
|
private boolean |
isUpdatedOrWarn(String command,
File target,
boolean existedBefore,
long lastModifiedBefore) |
private final LogWrapper log
CommandExecutor(LogWrapper log)
String execute(File workingDir, File pathToExecutable, String command, String[] args, File... resFile) throws BuildFailureException
workingDir - the working directory.
The shell changes to that directory
before invoking command
with arguments args.pathToExecutable - the path to the executable command.
This may be null if command
is on the execution pathcommand - the name of the program to be executedargs - the list of arguments,
each containing a blank enclosed in double quotes.resFile - result files, i.e. target files which shall be updated
bu this command.BuildFailureExceptionprivate boolean isUpdatedOrWarn(String command, File target, boolean existedBefore, long lastModifiedBefore)
command - the name of the program to be executed
Logging:
private String execute(File workingDir, File pathToExecutable, String command, String[] args) throws BuildFailureException
command with arguments args
in the working directory workingDir.
Here, pathToExecutable is the path
to the executable. May be null?
Logging: EEX01 for return code other than 0.
workingDir - the working directory.
The shell changes to that directory
before invoking command
with arguments args.pathToExecutable - the path to the executable command.
This may be null if command
is on the execution pathcommand - the name of the program to be executedargs - the list of arguments,
each containing a blank enclosed in double quotes.BuildFailureException - TEX01 if invocation of command fails very basically:
Runtime.exec(String, String[], File) fails
throwing an IOException.
InterruptedException
on the process to be executed thrown by Process.waitFor().
Copyright © 2016–2018 Simuline Organization (l2r). All rights reserved.