API Overview
API function syntax
The Link API functions all reside in ⎕SE.Link
.
The general syntax for Link API functions is as follows:
message ← options ⎕SE.Link.FnName args
where:
message
is a simple character vector or nested array containing messages related to the effects of the function call.options
is a namespace containing optional parameters. Only certain functions accept an options namespace.FnName
is the name of the API functionargs
is either a character vector or a nested vector as described in the help section for that API function.
Option Namespaces
Some API functions accept an option namespace as the left argument. For example, to create a link with non-default source
and flatten
options,
you would write:
options←⎕NS ⍬ ⍝ create empty namespace
options.(source flatten)←'dir' 1 ⍝ set two named options
options ⎕SE.Link.Create 'myapp' '/sources/myapp' ⍝ namespace and director name on the right, options on left
User commands
Some API functions have a corresponding user command, to make them a little easier to use interactively. The API functions with user command covers are indicated with ]
in the function reference tables. These user commands all take exactly the same arguments and options as the API functions, specified using user command syntax. The Link.Create call above would thus be written:
]LINK.Create myapp /sources/myapp -source=dir -flatten
Specifying extensions: Two options require arrays identifying file extensions: codeExtensions
, customExtensions
and typeExtensions
. For convenience, the ]LINK.Create
user command accepts the name of a variable containing the array, rather than the array values.
Basic API Function reference
Function | User Command | Right Argument(s) | Left Argument(s) | Result |
---|---|---|---|---|
Add | ]Add |
items | message | |
Break | ]Break |
namespaces | options: all exact |
message |
Create | ]Create |
namespace directory | options: source watch (and many more) |
message |
Export | ]Export |
namespace directory | options: overwrite caseCode arrays sysVars |
message |
Expunge | ]Expunge |
items | boolean array | |
Import | ]Import |
namespace directory | options: overwrite flatten fastLoad |
message |
LaunchDir | none | none | directory name | |
Pause | ]Pause |
message | ||
Refresh | ]Refresh |
namespace | options: source |
message |
Resync | ]Resync |
options: confirm pause |
message | |
Status | ]Status |
namespace | options: extended |
message |
Version | version number as string |
Note
The currently active version of Link can be found as part of ]TOOLS.Version
Advanced API Function reference
Function | User Command | Right Argument(s) | Left Argument(s) | Result |
---|---|---|---|---|
CaseCode | filename | <none> | case-coded filename | |
Fix | source | array: namespace name oldname | boolean | |
GetFileName | ]GetFileName |
items | <none> | filenames |
GetItemName | ]GetItemName |
filenames | <none> | items |
Notify | event filename oldfilename | <none> | <none> | |
StripCaseCode | filename | <none> | filename without case code | |
TypeExtension | name class | option namespace used for Create | file extension (without leading '.' ) |