| 263 | } |
| 264 | |
| 265 | std::unique_ptr<Directory> chdir(const Path& path) |
| 266 | { |
| 267 | std::unique_ptr<Directory> dir = |
| 268 | std::make_unique<Directory>(this, ROOT_DIRECTORY_BLOCK); |
| 269 | for (const auto& element : path) |
| 270 | { |
| 271 | auto entry = dir->find(element); |
| 272 | if (entry->file_type == TYPE_FILE) |
| 273 | throw BadPathException("tried to use a file like a directory"); |
| 274 | |
| 275 | dir = std::make_unique<Directory>(this, entry->keyBlock); |
| 276 | } |
| 277 | return dir; |
| 278 | } |
| 279 | |
| 280 | /* Always appends 128kB of data. */ |
| 281 | void readIndexBlock(const Bytes& indexBlock, ByteWriter& bw) |
nothing calls this directly
no test coverage detected