M3PathElem
provides the abstraction of a search path element,
defined as a file system directory.
INTERFACEAnM3PathElem ; CONST Brand = "M3PathElem"; TYPE T <: Public; Public = OBJECT METHODS text(): TEXT; unexpanded(): TEXT; readOnly(): BOOLEAN; setReadOnly(ro: BOOLEAN := TRUE); END; CONST CurrentDir = "";
M3PathElem.T
is a unique representative for a set of {\it
equal} directories, where equality is a file system specific notion.
For example two textually different names may denote the same
directory by the mechanism of symbolic links. The text
method
returns the directory name after any environment variables have been
expanded. unexpanded
returns the unexpanded form. readOnly
implies that the directory has been designated as read-only. The
read-only status may be changed via the setReadOnly
call.
CurrentDir
can be used as an operating system independent denotation
for the current working directory. If it is passed to FromText
it is
as if Process.GetWorkingDirectory()
had been passed instead.
PROCEDURE Equal(e1, e2: T): BOOLEAN;
Returns e1 = e2.
PROCEDURE FromText(expanded, unexpanded: TEXT; readOnly := FALSE): T;
Return anT
object forexpanded
, such thatt.text()
will returnexpanded
,t.unexpanded()
will returnunexpanded
andt.readOnly()
will returnreadOnly
.
END M3PathElem.