SUMMARY: MODULE | CLASS | TYPE | PROC | VAR | CONST | DETAIL: TYPE | PROC | VAR | CONST |
Object Object
Procedure Summary | |
BaseName(STRING): STRING Calculates the basename of pathname path. | |
Decode(ARRAY OF CHAR): STRING Convert a system-specific sequence of bytes path representing a file path into a string instance. | |
DirName(STRING): STRING Calculates the directory name of pathname path. | |
Encode(STRING): CharsLatin1 Encode the file path or command path as a system-specific sequence of bytes. | |
SplitExt(STRING, VAR STRING, VAR STRING) Splits the pathname path into a pair `(root, ext)' such that `concat(root,ext) = path'. |
Procedure Detail |
PROCEDURE BaseName(path: STRING): STRING
Calculates the basename of pathname path. The basename is the last pathname component of path. It never contains a slash. If path ends with a slash, then the basename is the empty string. If path does not contain a slash, then the basename equals path.
PROCEDURE Decode(path: ARRAY OF CHAR): STRING
Convert a system-specific sequence of bytes path representing a file path into a string instance. This is the inverse of Encode.
PROCEDURE DirName(path: STRING): STRING
Calculates the directory name of pathname path.
PROCEDURE Encode(path: STRING): CharsLatin1
Encode the file path or command path as a system-specific sequence of bytes.
The default implementation returns a string with all character codes above `0FFX' replaced with the character `_'. That is, non ISO Latin1 characters are discarded. For instances of Object.String8, it is the identity operation.
PROCEDURE SplitExt(path: STRING; VAR root: STRING; VAR ext: STRING)
Splits the pathname path into a pair `(root, ext)' such that `concat(root,ext) = path'. The extension ext is empty or begins with a period and contains at most one period. The extension string does not contain a slash character.