version 1.7, 2001/12/13 14:54:02
|
version 1.8, 2002/03/19 22:55:59
|
|
|
// added nsk platform support | // added nsk platform support |
// | // |
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
|
|
|
#include <fstream> |
#include "System.h" | #include "System.h" |
| |
#if defined(PEGASUS_OS_TYPE_WINDOWS) | #if defined(PEGASUS_OS_TYPE_WINDOWS) |
|
|
#else | #else |
# error "Unsupported platform" | # error "Unsupported platform" |
#endif | #endif |
|
|
|
PEGASUS_USING_STD; |
|
|
|
PEGASUS_NAMESPACE_BEGIN |
|
|
|
Boolean System::copyFile(const char* fromPath, const char* toPath) |
|
{ |
|
ifstream is(fromPath, ios::binary); |
|
ofstream os(toPath, ios::binary); |
|
|
|
char c; |
|
|
|
while (is.get(c)) |
|
{ |
|
if (!os.put(c)) |
|
return false; |
|
} |
|
|
|
return true; |
|
} |
|
|
|
PEGASUS_NAMESPACE_END |