Command Line Interface

The command line interface uses a single executable —

  • For Microsoft Windows: tlapi.exe

  • For Unix: tlapi

The executable is installed in the sys/bin subdirectory of the TopLeaf installation directory. The installation path must be included in your PATH environment variable.

The general form for a call to tlapi is:

tlapi arguments

The arguments can be either flag parameters or positional parameters

A flag parameter starts with “‑” and a single letter. Some flags have a string or numeric argument, which follows immediately after the letter (a separating space is optional). Flag parameters can appear in any order, but must be before the first positional parameter.

Positional parameters follow the flags. Each one must be a single “word” as defined by the operating system, so you may need to enclose it in quotes. Positional parameters must appear in the order specified.

The descriptions of command line API calls use square brackets to indicate optional arguments. For example, in the call

tlapi [‑x] ‑c GETDATA [‑psPhase] ‑o sOutFile sPart

the ‑x and ‑p flags are optional while the ‑c and ‑o flags are required. Do not include the brackets in the API call.

Arguments which require a string value appear as sString; arguments that require a number appear as nNumber.

All API calls have an argument called sPart specifying the path to the partition on which the API call operates. The format of this argument is discussed in “Partition Paths”.