MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / list

Method list

lib/vfs/fatfs.cc:98–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96 }
97
98 std::vector<std::shared_ptr<Dirent>> list(const Path& path) override
99 {
100 mount();
101
102 DIR dir;
103 auto pathstr = toUpper(path.to_str());
104 FRESULT res = f_opendir(&dir, pathstr.c_str());
105 std::vector<std::shared_ptr<Dirent>> results;
106
107 for (;;)
108 {
109 FILINFO filinfo;
110 res = f_readdir(&dir, &filinfo);
111 if (res != FR_OK)
112 throw BadFilesystemException();
113 if (filinfo.fname[0] == 0)
114 break;
115
116 results.push_back(toDirent(filinfo, path));
117 }
118
119 f_closedir(&dir);
120 return results;
121 }
122
123 std::shared_ptr<Dirent> getDirent(const Path& path) override
124 {

Callers

nothing calls this directly

Calls 4

toUpperFunction · 0.85
to_strMethod · 0.80
push_backMethod · 0.45

Tested by

no test coverage detected