next up previous contents index
Next: GetCBreak Up: Functions and Procedures Previous: FSearch

FSplit

   

Declaration:

Procedure FSplit (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.)

Under LINUX, the extension is taken to be all letters after the last dot (.).

Errors:

None.

See also:

FSearch

Example
Program Example12;
uses Dos;

{ Program to demonstrate the FSplit function. }

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



Michael Van Canneyt
Thu Sep 10 13:59:33 CEST 1998