| 111 | } |
| 112 | |
| 113 | void Explorer::CopyDirectory(const std::string &dir, const std::string &new_dir) { |
| 114 | const auto full_dir = this->MakeFull(dir); |
| 115 | auto exp = GetExplorerForPath(new_dir); |
| 116 | const auto full_new_dir = exp->MakeFull(new_dir); |
| 117 | exp->CreateDirectory(full_new_dir); |
| 118 | const auto dirs = this->GetDirectories(full_dir); |
| 119 | for(const auto &sub_dir: dirs) { |
| 120 | const auto from = full_dir + "/" + sub_dir; |
| 121 | const auto to = full_new_dir + "/" + sub_dir; |
| 122 | this->CopyDirectory(from, to); |
| 123 | } |
| 124 | const auto files = this->GetFiles(full_dir); |
| 125 | for(const auto &sub_file: files) { |
| 126 | const auto from = full_dir + "/" + sub_file; |
| 127 | const auto to = full_new_dir + "/" + sub_file; |
| 128 | this->CopyFile(from, to); |
| 129 | } |
| 130 | } |
| 131 | |
| 132 | void Explorer::CopyFileProgress(const std::string &path, const std::string &new_path, CopyFileStartCallback start_cb, CopyFileProgressCallback prog_cb) { |
| 133 | const auto full_path = this->MakeFull(path); |
nothing calls this directly
no test coverage detected