Skip to main content

4. Directory

The directory is a system file in which the names and descriptions of all user-defined containers are kept.

The directory is structured as a tree. Each node has an ident, which need not be unique. There is a single path from the root of the tree to any node. The idents of the nodes along this path are concatenated, separated by periods, to form a pathname, which unambiguously identifies the node (e.g., A.B.C could be a pathname for node with an ident of C).

In a later version of the software, the directory will be generalized to provide for links between nodes, so that it will not properly be a tree. For now, however, the tree model is convenient and adequate.

A node may represent a container, or it may simply hold a place in the space of pathnames. When it represents a container, it cannot (currently) have subordinate nodes.

Eventually, it is planned to model the directory as a structure of containers, with its description distributed throughout the structure. Most operations defined on the directory will be defined on user data, and vice versa. Access privileges and privacy locks will be part of the data description and will likewise be applicable both to directory nodes and data structures below the node level.

4.1 CREATE​

A CREATE-request either; (a) adds a node to the directory, optionally associating the description of either a PORT or a FILE with the node, or (b) creates a temporary container which is not entered in the directory, but has a description and can be referenced in requests. If the description defines a file, CREATE causes space to be allocated for the file.

To create a node with a description:

CREATE <pathname> <description> ;

To create a node with no description:

CREATE <pathname> ;

Note that the description determines whether or not the container is temporary (see section 3.2 for details).

A CREATE-request adds a single node to the directory. Thus to add CCA.RAW.F to an empty directory, three requests are needed:

CREATE CCA ;
CREATE CCA.RAW ;
CREATE CCA.RAW.F ;

Notice that the last ident of the pathname doubles as the first ident of the description:

CREATE CCA.RAW.G FILE LIST A STR (5) ;

That is, G is both the ident of a node and the ident of an outermost container of type LIST.

4.2 DELETE​

A DELETE-request deletes a tree of nodes and any associated descriptions or data. The syntax is:

DELETE <pathname> ;

The named node and any subordinates are deleted.

Note that to delete data while retaining the directory entry and description, DELETE should not be used (see section 6.3 for the proper method).

4.3 LIST​

The LIST-request is used to display system data of interest to a user. It causes the data specified to be transmitted through the Datalanguage output port.

Several arguments of LIST apply to the directory. LIST %ALL transmits all pathnames in the directory. LIST %ALL.%SOURCE transmits all descriptions in the directory. Instead of %ALL, a pathname can be used:

LIST <pn>.%ALL

Lists pathnames subordinate to <pn>.

LIST <pn>.%SOURCE

lists descriptions subordinate to the node represented by <pn>.

For details about the LIST-request, see section 10.1.