| 147 | } |
| 148 | |
| 149 | Bytes getFile(const Path& path) override |
| 150 | { |
| 151 | mount(); |
| 152 | if (path.size() != 1) |
| 153 | throw BadPathException(); |
| 154 | |
| 155 | auto dirent = findFile(path.front()); |
| 156 | |
| 157 | Bytes data; |
| 158 | ByteWriter bw(data); |
| 159 | for (const auto& sdw : dirent->sdws) |
| 160 | bw += getLogicalSector(sdw.start, sdw.length); |
| 161 | |
| 162 | return data.slice(512); |
| 163 | } |
| 164 | |
| 165 | private: |
| 166 | void mount() |
nothing calls this directly
no test coverage detected