metaonly interface xdc.tools.ICmd |
![](../../Arrow_up.png) |
![](../../Arrow_right.png) |
Generic xdc-script (xs) command
Modules that implement this interface can serve as "commands" that
can be executed from the command line (via
xs) or from within
XDCscript scripts (without having to fork a separate process to run
xs).
[
more ... ]
metaonly interface ICmd { ...
instance: ...
metaonly interface ICmd {
module-wide config parameters
module-wide functions
instance:
per-instance functions
}
DETAILS
Modules that implement this interface can serve as "commands" that
can be executed from the command line (via xs) or from within
XDCscript scripts (without having to fork a separate process to run
xs).
COMMAND LINE EXAMPLE
The following example runs the xdc.tools.path tool from the command
line to get an array of names of all packages below the current
working directory (".").
xs xdc.tools.path -n -a -PR .
XDCSCRIPT EXAMPLE
The following example runs the xdc.tools.path tool from within
a script to get an array of names of all packages below the current
working directory (".").
var Main = xdc.module('xdc.tools.path.Main');
var result = Main.exec(["-n", "-a", "-PR", "."]);
config ICmd.usage // module-wide |
![](../../Arrow_up.png) |
Usage for this command
config String usage[] = [ ];
ICmd.exec() // module-wide |
![](../../Arrow_up.png) |
xs script entry point
ICmd.main() // module-wide |
![](../../Arrow_up.png) |
xs shell entry point
ICmd.run() // instance |
![](../../Arrow_up.png) |
Underlying implementation
generated on Tue, 16 Oct 2012 23:14:44 GMT