Expand a relative filename to an absolute filename.
Source position: finah.inc line 31
function ExpandFileName( |
const FileName: UnicodeString |
):UnicodeString; |
const FileName: UnicodeString; |
const BasePath: UnicodeString |
):UnicodeString; |
const FileName: RawByteString |
):RawByteString; |
const FileName: RawByteString; |
const BasePath: RawByteString |
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.
None.
|
Expand a filename entered as case insensitive to the full path as stored on the disk. |
|
|
Extract the filename part from a full path filename. |
|
|
Extract the path from a filename. |
|
|
Extract the drive and directory part of a filename. |
|
|
Extract the drive part from a filename. |
|
|
Return the extension from a filename. |
|
|
Extract a relative path from a filename, given a base directory. |
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.