| 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() |
no test coverage detected