[Overview][Constants][Types][Procedures and functions][Variables] | Reference for unit 'oldlinux' (#rtl) |
Return basename of a file
Source position: oldlinux.pp line 1584
function Basename( |
const path: PathStr; |
const suf: PathStr |
):PathStr; |
Returns the filename part of Path, stripping off Suf if it exists. The filename part is the whole name if Path contains no slash, or the part of Path after the last slash. The last character of the result is not a slash, unless the directory is the root directory.
None.
|
Extract directory part from filename |
|
|
Expand filename to fully qualified path |
Program Example48; { Program to demonstrate the BaseName function. } Uses oldlinux; Var S : String; begin S:=FExpand(Paramstr(0)); Writeln ('This program is called : ',Basename(S,'')); end.
No notes exist for this page yet.