Returns the full path name for a relative file name on a case-sensitive file system.
function ExpandFileNameCase(const FileName: string; out MatchFound: TFilenameCaseMatch): string;
AnsiString ExpandFileNameCase(const AnsiString FileName, TFilenameCaseMatch MatchFound);
SysUtils
ExpandFileNameCase expands a relative file name into a fully qualified path name, then attempts to find the file or a close case-insensitive match. This is useful when converting file name data from case-insensitive conventions (Windows) to case-sensitive conventions (Linux). It is also useful for validating file names entered by users unfamiliar with Linux conventions.
FileName is the relative file name to expand.
MatchFound indicates what match, if any, was found for FileName.
The return value is the fully qualified path name generated by ExpandFileNameCase. Its relationship to FileName depends on the value of MatchFound, as indicated in the following table:
MatchFound |
Return value |
mkNone |
The fully qualified path name, as returned by ExpandFileName. |
mkExactMatch |
The fully qualified path name for the single case-sensitive match to FileName. This is the same value as the one returned when MatchFound is mkNone. |
mkSingleMatch |
(Linux only.) The fully qualified path name for the single file that matches FileName case-insensitively. |
mkAmbiguous |
(Linux only.) The fully qualified path name for one of the case-insensitve matches to FileName. This path name is not the same as the specified file, and not necessarily the closest match. |
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
|
What do you think about this topic? Send feedback!
|