| 289 | } |
| 290 | |
| 291 | void Doom3FileSystem::forEachFile(const std::string& basedir, |
| 292 | const std::string& extension, |
| 293 | const VisitorFunc& visitorFunc, |
| 294 | std::size_t depth) |
| 295 | { |
| 296 | std::string dirWithSlash = os::standardPathWithSlash(basedir); |
| 297 | |
| 298 | // Look for an assets.lst in the base dir |
| 299 | auto assetsList = findAssetsList(dirWithSlash); |
| 300 | |
| 301 | // Construct our FileVisitor filtering out the right elements |
| 302 | FileVisitor fileVisitor(visitorFunc, dirWithSlash, extension, depth); |
| 303 | fileVisitor.setAssetsList(*assetsList); |
| 304 | |
| 305 | // Visit each Archive, applying the FileVisitor to each one (which in |
| 306 | // turn calls the callback for each matching file. |
| 307 | for (const auto& descriptor : _archives) |
| 308 | { |
| 309 | descriptor.archive->traverse(fileVisitor, dirWithSlash); |
| 310 | } |
| 311 | } |
| 312 | |
| 313 | void Doom3FileSystem::forEachFileInAbsolutePath(const std::string& path, |
| 314 | const std::string& extension, |
no test coverage detected