Class: DuProcess

DuProcess

A class to launch and manage processes, using the system command line.

new DuProcess(processPath, args, timeout)

D:/DEV_SRC/RxOT/DuPSF/tools/output/DuPSF.jsxinc, line 6666
Constructs a new DuProcess instance
Name Type Default Description
processPath string The path to the process executable binary
args Array.<string> optional The common arguments used to run the process. You can append arguments each time you run the process with start(args)
timeout int 0 optional Waiting timeout after process start, in ms, 0 to avoid waiting, -1 for infinite. If the process times out, process will not be killed, the script will just stop waiting.

Members

staticDuProcess.argsArray.<any>

The common arguments used to run the process. You can append arguments each time you run the process with start(args)

static,readonlyDuProcess.isAppPackageBoolean

True if the process path leads to an application package (.app folder containing at least "/Contents/MacOS") on mac. False otherwise.

static,readonlyDuProcess.latestCommandstring

The latest command which has been run.

static,readonlyDuProcess.processPathstring

The path to the process executable binary

staticDuProcess.queueArray.<Array.<string>>

An Array of arguments array.
Arrays of arguments in the queue will be processed one after each other.
Update the Array and launch the queue with startQueue()

staticDuProcess.timeoutint

Waiting timeout after process start, in ms, 0 to avoid waiting, -1 for infinite.
If the process times out, process will not be killed, the script will just stop waiting. Default: 0

Methods

staticDuProcess.isAppPackage(path){bool}

D:/DEV_SRC/RxOT/DuPSF/tools/output/DuPSF.jsxinc, line 6923
Checks if a given path leads to an Application package on Mac, i.e. it's a path ending with .app containing at least Contents/MacOS/.
Name Type Description
path string | Folder | File The path to the file or folder to check.
Returns:
Type Description
bool true if path is an application package.

staticDuProcess.run(process, args){string}

D:/DEV_SRC/RxOT/DuPSF/tools/output/DuPSF.jsxinc, line 6909
Runs a command with some arguments.
Name Type Default Description
process string | File The process or a path to the process.
args Array.<string> [] optional The arguments to pass to the command.
Returns:
Type Description
string The output from the command.

buildCmd(args){string}

D:/DEV_SRC/RxOT/DuPSF/tools/output/DuPSF.jsxinc, line 6805
Builds and returns the command line
Name Type Description
args Array.<string> optional Args to append to DuProcess.args before starting
Returns:
Type Description
string The command

buildQueueCmd(){string}

D:/DEV_SRC/RxOT/DuPSF/tools/output/DuPSF.jsxinc, line 6857
Builds and returns the command line to launch the current queue
Returns:
Type Description
string The command

start(args, timeout)

D:/DEV_SRC/RxOT/DuPSF/tools/output/DuPSF.jsxinc, line 6741
Starts the process
Name Type Description
args Array Args to append to DuProcess.args before starting
timeout int optional Overrides the default timeout.

startCmd(cmd)

D:/DEV_SRC/RxOT/DuPSF/tools/output/DuPSF.jsxinc, line 6879
Starts a command (in another thread).
Name Type Description
cmd string The command to start

startQueue(timeout)

D:/DEV_SRC/RxOT/DuPSF/tools/output/DuPSF.jsxinc, line 6756
Starts the queue
Name Type Description
timeout int optional Overrides the default timeout.

waitForFinished(timeout)

D:/DEV_SRC/RxOT/DuPSF/tools/output/DuPSF.jsxinc, line 6773
Waits for the process to finish
Name Type Description
timeout int optional Overrides the default timeout.