-
Notifications
You must be signed in to change notification settings - Fork 10
API
The Link API functions are normally found in ⎕SE.Link. All API functions take a character
vector or vector of vectors as a right argument, and optionally a namespace containing option values on
the left. For more details on setting options, look below the table:
| Function | Right Argument(s) | Options | Result |
|---|---|---|---|
| Add | items | filename | |
| Break | namespace | ||
| CaseCode | filename | case-coded filename | |
| Create | namespace directory | source watch [and many more] | |
| Export | namespace directory | ||
| Expunge | items | ||
| Fix | source | larg: ns name oldname | |
| GetFileName | item | ||
| GetItemName | filename | itemname | |
| Import | namespace directory | ||
| List | [namespace] | ||
| Notify | event filename oldfilename | ||
| Refresh | namespace |
API functions take a primary argument on the right which is a simple
character vector or a vector of vectors as documented above. With the exception of Fix,
which takes a 3-element left argument, API functions typically 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 leftMost, but not all, API functions have a corresponding user command, to make them a little easier to use interactively. 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 -flattenSpecifying extensions: Two options require arrays identifying file extensions: codeExtensions and typeExtensions.
For convenience, the ]Link.Create user command accepts the name of a variable containing the array,
rather than the array values. However, in this case,
is highly recommended to use the API function directly rather than the user command.
Quick links: Introduction Installation Wiki home Email us