SearchPaths.mesa
Copyright Ó 1992 by Xerox Corporation. All rights reserved.
Last tweaked by Mike Spreitzer May 28, 1992 5:36 pm PDT
Interface to views that implement search paths.
DIRECTORY PFS, PFSNames, Rope;
SearchPaths: CEDAR DEFINITIONS
= {
ROPE: TYPE ~ Rope.ROPE;
PATH: TYPE ~ PFSNames.PATH;
SearchPath: TYPE ~ LIST OF PATH;
Each element is an absolute directory. They are consulted in order.
SetPath: PROC [name: ROPE, search: SearchPath];
Associates the given search path with the given name.
May be called multiple times per name.
GetScratchPath: PROC [base: ROPE, search: SearchPath] RETURNS [name: ROPE];
Invents a path name not previously associated with any path. The invented name begins with base, and is returned in name. The given search path is associated with the invented name.
GetPath: PROC [name: ROPE] RETURNS [search: SearchPath];
Raises PFS.Error[[environment, $SearchPathNotFound, IO.PutFR1["search path %g not found", [rope[name]] ], name]] if name hasn't been defined.
DeletePath: PROC [name: ROPE] RETURNS [had: BOOL];
Disassociates the given name from its search path; returns an indication of whether it had an association.
c0: READONLY PFSNames.Component;
PFSNames.ConstructName[LIST[c0, name]] names a directory that contains the union of the contents of the directories associated with name.
ConsSearchDir: PROC [pathName: ROPE] RETURNS [--absolute directory--PATH];
ConsFileSearch: PROC [pathName: ROPE, short: PFSNames.Component] RETURNS [PATH];
}.