Expand a filename entered as case insensitive to the full path as stored on the disk.
Source position: finah.inc line 33
function ExpandFileNameCase( |
const FileName: UnicodeString; |
out MatchFound: TFilenameCaseMatch |
):UnicodeString; |
const FileName: RawByteString; |
out MatchFound: TFilenameCaseMatch |
):RawByteString; |
On case insensitive platforms, ExpandFileNameCase behaves similarly to ExpandFileName except for the fact that it returns the final part of the path with the same case of letters as found on the disk (if it exists - otherwise the case equals the one provided on input). On case sensitive platforms it also checks whether one or more full paths exist on disk which would correspond to the provided input if treated case insensitively and returns the first such match found and information whether the match is unique or not.
Note that the behaviour is basically undefined if the input includes wildcards characters. Normally, wildcards in the last part of path provided on input are resolved to the first corresponding item found on the disk, but it is better not to rely on that and use other more suitable functions if working with wildcards like FindFirst/FindNext.
None.
|
Expand a relative filename to an absolute filename. |
|
|
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.