version 1.56, 2005/03/27 22:30:44
|
version 1.57, 2005/06/03 19:47:32
|
|
|
String path = String::EMPTY; | String path = String::EMPTY; |
String root = String::EMPTY; | String root = String::EMPTY; |
String tempPath = paths; | String tempPath = paths; |
|
|
|
#if defined(PEGASUS_OS_VMS) |
|
|
|
if (FileSystem::exists(paths + filename) == true) |
|
{ |
|
root = filename; |
|
} |
|
#else |
do { | do { |
if (( pos = tempPath.find(FileSystem::getPathDelimiter())) == PEG_NOT_FOUND) { | if (( pos = tempPath.find(FileSystem::getPathDelimiter())) == PEG_NOT_FOUND) { |
pos = tempPath.size(); | pos = tempPath.size(); |
|
|
path = tempPath.subString(0, pos); | path = tempPath.subString(0, pos); |
tempPath.remove(0,pos+token); | tempPath.remove(0,pos+token); |
if (FileSystem::exists( path + "/" + filename) == true) { | if (FileSystem::exists( path + "/" + filename) == true) { |
#if defined(PEGASUS_OS_VMS) |
|
root = filename; |
|
#else |
|
root = path + "/" + filename; | root = path + "/" + filename; |
#endif |
|
break; | break; |
} else | } else |
{ | { |
// cout << "File does not exist.\n"; | // cout << "File does not exist.\n"; |
} | } |
} while (tempPath.size() > 0); | } while (tempPath.size() > 0); |
|
#endif |
return root; | return root; |
} | } |
| |