| 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 | { |
nothing calls this directly
no test coverage detected