-----------------------------------------------------------------------
| 32 | |
| 33 | //----------------------------------------------------------------------- |
| 34 | void copyFile(const String& src, const String& dst) |
| 35 | { |
| 36 | std::ifstream in(src.c_str(), std::ios::in | std::ios::binary); |
| 37 | std::ofstream out(dst.c_str(), std::ios::out | std::ios::binary | std::ios::trunc); |
| 38 | |
| 39 | if (!in || !out) |
| 40 | { |
| 41 | LogOgreAndXSI("Unable to copy texture '" + src + "' to '" + dst + "'"); |
| 42 | return; |
| 43 | } |
| 44 | |
| 45 | char tmpBuf[2048]; |
| 46 | |
| 47 | while (!in.eof()) |
| 48 | { |
| 49 | in.read(tmpBuf, 2048); |
| 50 | |
| 51 | std::streamsize c = in.gcount(); |
| 52 | |
| 53 | out.write(tmpBuf, c); |
| 54 | |
| 55 | } |
| 56 | |
| 57 | in.close(); |
| 58 | out.close(); |
| 59 | |
| 60 | |
| 61 | |
| 62 | } |
| 63 | //----------------------------------------------------------------------- |
| 64 | template<> ProgressManager* Singleton<ProgressManager>::msSingleton = 0; |
| 65 | ProgressManager* ProgressManager::getSingletonPtr(void) |