| 150 | } |
| 151 | |
| 152 | Bytes getFile(const Path& path) override |
| 153 | { |
| 154 | AcornDfsDirectory dir(this); |
| 155 | auto dirent = dir.findFile(path); |
| 156 | int sectors = (dirent->length + 255) / 256; |
| 157 | |
| 158 | Bytes data; |
| 159 | ByteWriter bw(data); |
| 160 | for (int i = 0; i < sectors; i++) |
| 161 | { |
| 162 | auto sector = getLogicalSector(dirent->start_sector + i); |
| 163 | bw.append(sector); |
| 164 | } |
| 165 | |
| 166 | data.resize(dirent->length); |
| 167 | return data; |
| 168 | } |
| 169 | |
| 170 | std::shared_ptr<Dirent> getDirent(const Path& path) override |
| 171 | { |