version 1.71.6.3, 2007/09/12 16:18:48
|
version 1.71.6.5, 2007/09/20 20:00:21
|
|
|
| |
Boolean FileSystem::existsNoCase(const String& path, String& realPath) | Boolean FileSystem::existsNoCase(const String& path, String& realPath) |
{ | { |
|
// If a file exists that has the same case as the path parmater, |
|
// then we can bypass the expensive directory scanning below. |
|
|
|
if (FileSystem::exists(path)) |
|
{ |
|
realPath = path; |
|
return true; |
|
} |
|
|
realPath.clear(); | realPath.clear(); |
CString cpath = _clonePath(path); | CString cpath = _clonePath(path); |
const char* p = cpath; | const char* p = cpath; |
|
|
if (strcmp(name, ".") == 0 || strcmp(name, "..") == 0) | if (strcmp(name, ".") == 0 || strcmp(name, "..") == 0) |
continue; | continue; |
| |
if (Match(name, pattern) == 0) |
if (Match(pattern, name) == 0) |
filenames.append(name); | filenames.append(name); |
} | } |
} | } |