MCPcopy Create free account
hub / github.com/WasmEdge/WasmEdge / getRoot

Function getRoot

lib/aot/cache.cpp:20–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18
19namespace {
20std::filesystem::path getRoot(Cache::StorageScope Scope) {
21 switch (Scope) {
22 case Cache::StorageScope::Global:
23 return std::filesystem::u8path(kCacheRoot);
24 case Cache::StorageScope::Local: {
25 if (const auto Home = Path::home(); !Home.empty()) {
26 return Home / "cache"sv;
27 }
28 return {};
29 }
30 default:
31 assumingUnreachable();
32 }
33}
34} // namespace
35
36Expect<std::filesystem::path> Cache::getPath(Span<const Byte> Data,

Callers 2

getPathMethod · 0.85
clearMethod · 0.85

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected