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

Method getDirent

lib/vfs/cpmfs.cc:283–296  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

281 }
282
283 std::shared_ptr<Dirent> getDirent(const Path& path) override
284 {
285 mount();
286 if (path.size() != 1)
287 throw BadPathException();
288
289 for (const auto& dirent : list(Path()))
290 {
291 if (dirent->filename == path.front())
292 return dirent;
293 }
294
295 throw FileNotFoundException();
296 }
297
298 void putMetadata(const Path& path,
299 const std::map<std::string, std::string>& metadata) override

Callers

nothing calls this directly

Calls 4

BadPathExceptionClass · 0.85
PathClass · 0.70
sizeMethod · 0.45

Tested by

no test coverage detected