Readonly
lengthNumber of arguments in the command line. The application name is not part of the command line.
There may be a command-line handler which performs a default action if there was no explicit action on the command line (open a default browser window, for example). This flag allows the default action to be prevented.
Readonly
stateThe type of command line being processed.
STATE_INITIAL_LAUNCH is the first launch of the application instance. STATE_REMOTE_AUTO is a remote command line automatically redirected to this instance. STATE_REMOTE_EXPLICIT is a remote command line explicitly redirected to this instance using xremote/windde/appleevents.
Readonly
workingThe working directory for this command line. Use this property instead of the working directory for the current process, since a redirected command line may have had a different working directory.
NS_ERROR_NOT_INITIALIZED if the working directory was not specified.
Optional
aInstancePtr: objectA run time mechanism for interface discovery.
NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.
aInstancePtr must not be null.
[in] A requested interface IID
[out] A pointer to an interface pointer to receive the result.
Find a command-line flag.
The position of the flag in the command line.
The flag name to locate. Do not include the initial hyphen.
Whether to do case-sensitive comparisons.
Get an argument from the array of command-line arguments.
On windows, flags of the form /flag are normalized to -flag. /flag:param are normalized to -flag param.
On *nix and mac flags of the form --flag are normalized to -flag. --flag=param are normalized to the form -flag param.
The indexth argument.
NS_ERROR_ILLEGAL_VALUE if aIndex is out of bounds.
The argument to retrieve. This index is 0-based, and does not include the application name.
A helper method which will find a flag and remove it in one step.
Whether the flag was found.
The flag name to find and remove.
Whether to do case-sensitive comparisons.
Find a flag with a parameter and remove both. This is a helper method that combines "findFlag" and "removeArguments" in one step.
null (a void astring) if the flag is not found. The parameter value if found. Note that null and the empty string are not the same.
NS_ERROR_INVALID_ARG if the flag exists without a parameter
The flag name to find and remove.
Whether to do case-sensitive flag search.
Resolve a file-path argument into an nsIFile. This method gracefully handles relative or absolute file paths, according to the working directory of this command line. If the path is relative and there is no working directory available, this may return null.
The path to resolve.
Resolves a URI argument into a URI. This method has platform-specific logic for converting an absolute URI or a relative file-path into the appropriate URI object; it gracefully handles win32 C:\ paths which would confuse the ioservice if passed directly.
The command-line argument to resolve.
Generated using TypeDoc
Represents the command line used to invoke a XUL application. This may be the original command-line of this instance, or a command line remoted from another instance of the application.
DEFINITIONS: "arguments" are any values found on the command line. "flags" are switches. In normalized form they are preceded by a single dash. Some flags may take "parameters", e.g. "--url ".