| 210 | |
| 211 | private: |
| 212 | std::shared_ptr<Dirent> toDirent(FILINFO& filinfo, const Path& parent) |
| 213 | { |
| 214 | auto dirent = std::make_shared<Dirent>(); |
| 215 | dirent->filename = toUpper(filinfo.fname); |
| 216 | dirent->path = parent; |
| 217 | dirent->path.push_back(dirent->filename); |
| 218 | dirent->length = filinfo.fsize; |
| 219 | dirent->file_type = |
| 220 | (filinfo.fattrib & AM_DIR) ? TYPE_DIRECTORY : TYPE_FILE; |
| 221 | dirent->mode = modeToString(filinfo.fattrib); |
| 222 | |
| 223 | dirent->attributes[Filesystem::FILENAME] = filinfo.fname; |
| 224 | dirent->attributes[Filesystem::LENGTH] = std::to_string(filinfo.fsize); |
| 225 | dirent->attributes[Filesystem::FILE_TYPE] = |
| 226 | (filinfo.fattrib & AM_DIR) ? "dir" : "file"; |
| 227 | dirent->attributes[Filesystem::MODE] = modeToString(filinfo.fattrib); |
| 228 | return dirent; |
| 229 | } |
| 230 | |
| 231 | public: |
| 232 | DRESULT diskRead(BYTE* buffer, LBA_t sector, UINT count) |
nothing calls this directly
no test coverage detected