MCPcopy Create free account
hub / github.com/codereader/DarkRadiant / forEachFile

Method forEachFile

radiantcore/vfs/Doom3FileSystem.cpp:291–311  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

289}
290
291void 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
313void Doom3FileSystem::forEachFileInAbsolutePath(const std::string& path,
314 const std::string& extension,

Callers 7

PopulateModelMethod · 0.45
PopulateModelMethod · 0.45
TEST_FFunction · 0.45
processFilesMethod · 0.45
test.pyFile · 0.45
loadFontsMethod · 0.45

Calls 3

setAssetsListMethod · 0.80
standardPathWithSlashFunction · 0.50
traverseMethod · 0.45

Tested by

no test coverage detected