ANTAREX API

Clava API

LARA API

LARA Common Language API

ProcessExecutor

Constructor

ProcessExecutor

new ProcessExecutor()

Launches processes.


Instance Members

execute

execute(command)

Parameters

command: (string...|string[]) - The command to be executed. Accepts a command as a sequence of strings, or as an array with strings.

getCommand

getCommand()

getConsoleOutput

getConsoleOutput()

getExecutableFile

getExecutableFile()

Returns

J#java.io.File - the file of the executable of the command, or undefined if could not locate the file.

getReturnValue

getReturnValue()

getStdErr

getStdErr()

getStdOut

getStdOut()

getWorkingDir

getWorkingDir()

setAppend

setAppend([printToConsole = true], append)

Sets if the output should be appended to the output of the previous execution.

Parameters

printToConsole: Boolean (optional)
append: any

setCustomReturnValue

setCustomReturnValue(returnValue)

Parameters

returnValue: (number|string) - an integer that represents the return value of the process executor

setLogErrorsOnly

setLogErrorsOnly(logErrorsOnly)

Parameters

logErrorsOnly: any

setOutputFile

setOutputFile(outputFile)

Parameters

outputFile: any

setOutputPrefix

setOutputPrefix(outputPrefix)

Parameters

outputPrefix: any

setPrintToConsole

setPrintToConsole([printToConsole = true])

Sets if the output of the process should be output to the console.

Parameters

printToConsole: Boolean (optional)

setStopOnError

setStopOnError(stopOnError)

If true, throws an exception if there is a problem when running the process. By default is set to 'false'.

Parameters

stopOnError: any

setTimeUnit

setTimeUnit(timeUnit)

Sets the time unit of the timeout value. By defaults, is SECONDS.

Parameters

timeUnit: any

setTimeout

setTimeout(timeout)

Parameters

timeout: any

setWorkingDir

setWorkingDir(workingDir)

Parameters

workingDir: any