MCPcopy Create free account
hub / github.com/KhronosGroup/OpenCOLLADA / copyFile

Method copyFile

COLLADAMaya/src/COLLADAMayaDocumentExporter.cpp:606–632  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

604 }
605
606 bool DocumentExporter::copyFile(const COLLADABU::URI & src, const COLLADABU::URI & dst) const
607 {
608 if (COLLADABU::Utils::fileExistsAndIsReadable(src.toNativePath()))
609 {
610 COLLADASW::URI dstDirURI(dst.getPathDir());
611 if (COLLADABU::Utils::createDirectoryRecursive(dstDirURI.toNativePath()))
612 {
613 if (COLLADABU::Utils::copyFile(src.toNativePath(), dst.toNativePath()))
614 {
615 return true;
616 }
617 else
618 {
619 MGlobal::displayError(MString("Cannot copy ") + src.toNativePath().c_str() + " to " + dst.toNativePath().c_str());
620 }
621 }
622 else
623 {
624 MGlobal::displayError(MString("Cannot create ") + dstDirURI.toNativePath().c_str());
625 }
626 }
627 else
628 {
629 MGlobal::displayError(MString("Cannot open ") + src.getURIString().c_str());
630 }
631 return false;
632 }
633
634 //---------------------------
635 SceneGraph* DocumentExporter::getSceneGraph()

Callers 2

exportCgfxShaderMethod · 0.45
exportImageMethod · 0.45

Calls 3

toNativePathMethod · 0.80
getPathDirMethod · 0.80
c_strMethod · 0.80

Tested by

no test coverage detected