version 1.46, 2006/12/13 09:47:39
|
version 1.47.4.1, 2007/02/15 16:23:30
|
|
|
#include "Socket.h" | #include "Socket.h" |
#include "Network.h" | #include "Network.h" |
#include <Pegasus/Common/PegasusVersion.h> | #include <Pegasus/Common/PegasusVersion.h> |
|
#include <Pegasus/Common/FileSystem.h> |
| |
#if defined(PEGASUS_OS_TYPE_WINDOWS) | #if defined(PEGASUS_OS_TYPE_WINDOWS) |
# include "SystemWindows.cpp" | # include "SystemWindows.cpp" |
|
|
Boolean System::copyFile(const char* fromPath, const char* toPath) | Boolean System::copyFile(const char* fromPath, const char* toPath) |
{ | { |
ifstream is(fromPath PEGASUS_IOS_BINARY); | ifstream is(fromPath PEGASUS_IOS_BINARY); |
ofstream os(toPath PEGASUS_IOS_BINARY); |
fstream os(toPath, ios::out PEGASUS_OR_IOS_BINARY); |
| |
char c; | char c; |
| |
|
|
return false; | return false; |
} | } |
| |
|
FileSystem::syncWithDirectoryUpdates(os); |
return is.eof(); | return is.eof(); |
} | } |
| |
|
|
// localhost ? | // localhost ? |
if (String::equalNoCase(hostName,String("localhost"))) return true; | if (String::equalNoCase(hostName,String("localhost"))) return true; |
char localHostName[PEGASUS_MAXHOSTNAMELEN]; | char localHostName[PEGASUS_MAXHOSTNAMELEN]; |
CString cstringLocalHostName = System::getHostName().getCString()); |
CString cstringLocalHostName = System::getHostName().getCString(); |
strcpy(localHostName, (const char*) cstringLocalHostName); | strcpy(localHostName, (const char*) cstringLocalHostName); |
// given hostname equals what system returns as local hostname ? | // given hostname equals what system returns as local hostname ? |
if (String::equalNoCase(hostName,localHostName)) return true; | if (String::equalNoCase(hostName,localHostName)) return true; |