MCPcopy Create free account
hub / github.com/Snapchat/Valdi / loadForAbsoluteURL

Method loadForAbsoluteURL

valdi/src/valdi/runtime/Resources/DiskCacheImpl.cpp:49–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49Result<BytesView> DiskCacheImpl::loadForAbsoluteURL(const StringBox& url) {
50 URL parsedURL(url);
51 if (parsedURL.getScheme() != "file") {
52 return Error("Invalid url");
53 }
54
55 Path path(parsedURL.getPath().toStringView());
56 return load(path);
57}
58
59Result<Void> DiskCacheImpl::store(const Path& path, const BytesView& bytes) {
60 auto resolvedPath = resolveAbsolutePath(path, false);

Callers 2

TEST_PFunction · 0.45
TESTFunction · 0.45

Calls 4

loadFunction · 0.85
ErrorInterface · 0.50
toStringViewMethod · 0.45
getPathMethod · 0.45

Tested by 2

TEST_PFunction · 0.36
TESTFunction · 0.36