| 350 | } |
| 351 | |
| 352 | void DumpDirs(const std::string& prefix, const Directory& dir, |
| 353 | std::vector<MockDirInfo>* out) { |
| 354 | std::string path = prefix + dir.name; |
| 355 | if (!path.empty()) { |
| 356 | out->push_back({path, dir.mtime}); |
| 357 | path += "/"; |
| 358 | } |
| 359 | for (const auto& pair : dir.entries) { |
| 360 | Entry* child = pair.second.get(); |
| 361 | if (child->is_dir()) { |
| 362 | DumpDirs(path, child->as_dir(), out); |
| 363 | } |
| 364 | } |
| 365 | } |
| 366 | |
| 367 | void DumpFiles(const std::string& prefix, const Directory& dir, |
| 368 | std::vector<MockFileInfo>* out) { |