ExpandFileName function
Expand a relative filename to an absolute filename.
Declaration
function ExpandFileName(const FileName: UnicodeString): UnicodeStringDescription
ExpandFileName expands the filename to an absolute filename.
It changes all directory separator characters to the one appropriate for the
system first.
If an empty filename is passed, it is expanded to the current directory.
If BasePath is not passed, the current directory is used as base path.
Errors
None.
See also
- ExpandFileNameCase
- ExtractFileName
- ExtractFilePath
- ExtractFileDir
- ExtractFileDrive
- ExtractFileExt
- ExtractRelativePath
Example: ex33
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.An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
