MODULE Paths; (* Stephan Junker *) (* Paths is able to search a file in search paths defined in an environment variable. Different paths are separated by a comma or a semicolon. A '*' as last subdirectory in a definition will cause all subdirectories in that directory to be searched. *) TYPE path* = POINTER TO pathdesc; pathdesc* = RECORD Next* : path; Path* : FN.path; END; PROCEDURE Get*(Paths : path; Name : ARRAY OF CHAR; Attribs : SET; VAR FullName : ARRAY OF CHAR) : BOOLEAN; (* searches the file Name in the current standard directory, then in the stored paths. Returns TRUE if found and FullName contains path and name. *) PROCEDURE Read*(VarName : ARRAY OF CHAR; VAR Paths : path); (* Reads the paths defined in the environment under the variable name VarName and return a pointer to the first path. *) END Paths.