help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Constants][Types][Procedures and functions][Variables] Reference for unit 'oldlinux' (#rtl)

Dirname

Extract directory part from filename

Declaration

Source position: oldlinux.pp line 1583

function Dirname(

  const path: PathStr

):PathStr;

Description

Returns the directory part of Path. The directory is the part of Path before the last slash, or empty if there is no slash. The last character of the result is not a slash, unless the directory is the root directory.

Errors

None.

See also

BaseName

  

Return basename of a file

FExpand

  

Expand filename to fully qualified path

Example

Program Example47;

{ Program to demonstrate the DirName function. }

Uses oldlinux;

Var S : String;

begin
  S:=FExpand(Paramstr(0));
  Writeln ('This program is in directory : ',Dirname(S));
end.

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505