MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / chdir

Method chdir

lib/vfs/prodos.cc:265–278  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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)

Callers

nothing calls this directly

Calls 2

BadPathExceptionClass · 0.85
findMethod · 0.45

Tested by

no test coverage detected