void File::copyDirectory(const std::string& path) const { File target(path); target.createDirectories(); Path src(getPathImpl()); src.makeFile(); DirectoryIterator it(src); DirectoryIterator end; for (; it != end; ++it) { it->copyTo(path); } }
void File::createDirectories() { if (!exists()) { Path p(getPathImpl()); p.makeDirectory(); if (p.depth() > 1) { p.makeParent(); File f(p); f.createDirectories(); } createDirectoryImpl(); } }
void File::copyTo(const std::string& path) const { Path src(getPathImpl()); Path dest(path); File destFile(path); if ((destFile.exists() && destFile.isDirectory()) || dest.isDirectory()) { dest.makeDirectory(); dest.setFileName(src.getFileName()); } if (isDirectory()) copyDirectory(dest.toString()); else copyToImpl(dest.toString()); }
const std::string& SharedLibrary::getPath() const { return getPathImpl(); }