| 74 | } |
| 75 | |
| 76 | int ReadDir(DirectoryEntry* dirPtr, uint32_t index) final { |
| 77 | if(index >= devices.get_length() + 2){ |
| 78 | return 0; |
| 79 | } |
| 80 | |
| 81 | if(index == 0){ |
| 82 | strcpy(dirPtr->name, "."); |
| 83 | dirPtr->flags = FS_NODE_DIRECTORY; |
| 84 | |
| 85 | return 1; |
| 86 | } else if(index == 1){ |
| 87 | strcpy(dirPtr->name, ".."); |
| 88 | dirPtr->flags = FS_NODE_DIRECTORY; |
| 89 | |
| 90 | return 1; |
| 91 | } else { |
| 92 | strcpy(dirPtr->name, devices[index - 2]->GetName()); |
| 93 | |
| 94 | return 1; |
| 95 | } |
| 96 | } |
| 97 | |
| 98 | FsNode* FindDir(char* name) final { |
| 99 | if(!strcmp(name, ".")){ |
nothing calls this directly
no test coverage detected