version 1.47, 2003/12/08 21:29:01
|
version 1.48, 2004/03/16 23:05:00
|
|
|
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
#include <iostream> | #include <iostream> |
#include <cstdio> |
//#include <cstdio> |
#include <Pegasus/Common/Config.h> | #include <Pegasus/Common/Config.h> |
#include <Pegasus/Common/System.h> | #include <Pegasus/Common/System.h> |
#include "Destroyer.h" | #include "Destroyer.h" |
|
|
return System::changeFilePermissions(tempPath, mode); | return System::changeFilePermissions(tempPath, mode); |
} | } |
| |
|
String FileSystem::getAbsoluteFileName(const String &paths, const String &filename) { |
|
|
|
Uint32 pos =0; |
|
Uint32 token=0; |
|
String path = String::EMPTY; |
|
String root = String::EMPTY; |
|
String tempPath = paths; |
|
do { |
|
if (( pos = tempPath.find(FileSystem::getPathDelimiter())) == PEG_NOT_FOUND) { |
|
pos = tempPath.size(); |
|
token = 0; |
|
} |
|
else { |
|
token = 1; |
|
} |
|
path = tempPath.subString(0, pos); |
|
tempPath.remove(0,pos+token); |
|
if (FileSystem::exists( path + "/" + filename ) == true) { |
|
root = path + "/" + filename; |
|
break; |
|
} else |
|
{ |
|
// cout << "File does not exist.\n"; |
|
} |
|
} while (tempPath.size() > 0); |
|
return root; |
|
} |
|
|
| |
Boolean GetLine(PEGASUS_STD(istream)& is, String& line) | Boolean GetLine(PEGASUS_STD(istream)& is, String& line) |
{ | { |