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



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

FSplit

Split filename into path, name and extension

Declaration

Source position: unixutil.pp line 38

procedure FSplit(

  const Path: PathStr;

  var Dir: DirStr;

  var Name: NameStr;

  var Ext: ExtStr

);

Description

FSplit splits a full file name into 3 parts : A Path, a Name and an extension (in ext). The extension is taken to be all letters after the last dot (.).

Errors

None.

See also

#rtl.unix.FSearch

  

Search for file in search path.

Example

Program Example67;

uses UnixUtil;

{ Program to demonstrate the FSplit function. }

var
  Path,Name,Ext : string;

begin
  FSplit(ParamStr(1),Path,Name,Ext);
  WriteLn('Split ',ParamStr(1),' in:');
  WriteLn('Path     : ',Path);
  WriteLn('Name     : ',Name);
  WriteLn('Extension: ',Ext);
end.

Notes

 No notes exist for this page yet. 





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