MAINSAIL Language Manual, Section 33.12

previous   next   top   complete contents   complete index   framed top   this page unframed


33.12. $decomposePath

Figure 33–11. $decomposePath
BOOLEAN
PROCEDURE   $decomposePath
                        (
STRING path;
                         
PRODUCES OPTIONAL STRING
                             
pathPrefix,pathComponents,
                             
devModStr;
                         
OPTIONAL BITS ctrlBits);

$decomposePath takes a directory path name and reduces it to a prefix, path components, and a device MODULE STRING devModStr. The path STRING is expected to include only directory components, i.e., is not expected to include the leaf file name; use $decomposeFileName to decompose a file name including a leaf file name.

The exact format of the decomposed path components is specific to the device, but in a tree-structured file system, the directories in the path are normally produced in pathComponents separated by eols, higher-level directories first. pathPrefix often represents a node name on file systems where more than one node is accessible; pathComponents usually represents the directory path name (for tree-structured directories) exclusive of the node name. pathPrefix is the empty STRING for a relative path (one that is relative to the current directory) on devices that support relative paths.

If a device MODULE is specified in path, devModStr includes the character $devModBrk at the end.

Consult the relevant part of the MAINSAIL System-Specific User's Guides for examples of $composePath and $decomposePath.

The only valid ctrlBits bit for $decomposePath is errorOK. If set, errMsg is not called when an error occurs.


previous   next   top   complete contents   complete index   framed top   this page unframed

MAINSAIL Language Manual, Section 33.12