M3PathElemOS is an operating system independent interface to
basic operations on search paths and search path elements.
INTERFACEM3PathElemOS ; IMPORT M3PathElemList; TYPE T <: REFANY; PROCEDURE Uid(dir: TEXT): T;
Return a handle to denote directorydir. Two handles that denote the same directory will returnTRUEwwhen passed toEqual.
PROCEDURE Equal(t1, t2: T): BOOLEAN;
ReturnTRUEifft1andt2denote the same directory.
PROCEDURE EnvExpand(dir: TEXT): TEXT;
Expand any environment variables in dir, according to the conventions
of the operating system. PROCEDURE RemoveParentDenotations(dir: TEXT): TEXT;
Return a pathname with as many parent directory denotations
removed as possible. PROCEDURE DecomposePath(path: TEXT; readOnly := FALSE): M3PathElemList.T;
pathis a list of directories separated by an OS-specific character, e.g.:. The path is decomposed into its components and anM3PathElemList.Tis generated. Each member of the result is created by a call ofM3PathElem.FromText(EnvExpand(c), c, readOnly), wherecis the component pathname.
END M3PathElemOS.