MCPcopy Create free account
hub / github.com/OGRECave/ogre / copyFile

Function copyFile

Tools/XSIExport/src/OgreXSIHelper.cpp:34–62  ·  view source on GitHub ↗

-----------------------------------------------------------------------

Source from the content-addressed store, hash-verified

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)

Callers 5

SetUpMethod · 0.85
TearDownMethod · 0.85
TEST_FFunction · 0.85
add2DTextureMethod · 0.85
addCubicTextureMethod · 0.85

Calls 5

LogOgreAndXSIFunction · 0.85
eofMethod · 0.45
readMethod · 0.45
writeMethod · 0.45
closeMethod · 0.45

Tested by 3

SetUpMethod · 0.68
TearDownMethod · 0.68
TEST_FFunction · 0.68