MCPcopy Create free account
hub / github.com/crownengine/crown / fetch

Method fetch

3rdparty/bx/src/file.cpp:641–670  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

639 }
640
641 static bool fetch(FileInfo& _out, DIR* _dir)
642 {
643 for (;;)
644 {
645 const dirent* item = readdir(_dir);
646
647 if (NULL == item)
648 {
649 break;
650 }
651
652 if (0 != (item->d_type & DT_DIR) )
653 {
654 _out.type = FileType::Dir;
655 _out.size = UINT64_MAX;
656 _out.filePath.set(item->d_name);
657 return true;
658 }
659
660 if (0 != (item->d_type & DT_REG) )
661 {
662 _out.type = FileType::File;
663 _out.size = UINT64_MAX;
664 _out.filePath.set(item->d_name);
665 return true;
666 }
667 }
668
669 return false;
670 }
671
672 FileInfo m_cache;
673 DIR* m_dir;

Callers

nothing calls this directly

Calls 2

readdirFunction · 0.70
setMethod · 0.45

Tested by

no test coverage detected