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



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

ExpandFileName

Expand a relative filename to an absolute filename.

Declaration

Source position: finah.inc line 33

function ExpandFileName(

  const FileName: String

):String;

Description

ExpandFileName expands the filename to an absolute filename. It changes all directory separator characters to the one appropriate for the system first.

Errors

None.

See also

ExtractFileName

  

Extract the filename part from a full path filename.

ExtractFilePath

  

Extract the path from a filename.

ExtractFileDir

  

Extract the drive and directory part of a filename.

ExtractFileDrive

  

Extract the drive part from a filename.

ExtractFileExt

  

Return the extension from a filename.

ExtractRelativePath

  

Extract a relative path from a filename, given a base directory.

Example

Program Example33;

{ This program demonstrates the ExpandFileName function }

Uses sysutils;

Procedure Testit (F : String);

begin
  Writeln (F,' expands to : ',ExpandFileName(F));
end;

Begin
  Testit('ex33.pp');
  Testit(ParamStr(0));
  Testit('/pp/bin/win32/ppc386');
  Testit('\pp\bin\win32\ppc386');
  Testit('.');
End.

Notes

 No notes exist for this page yet. 





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