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

Method getAbsoluteURL

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

Source from the content-addressed store, hash-verified

96}
97
98StringBox DiskCacheImpl::getAbsoluteURL(const Path& path) const {
99 auto resolvedPath = resolveAbsolutePath(path, false);
100 if (!resolvedPath) {
101 return StringCache::getGlobal().makeString(path.toString());
102 }
103
104 return STRING_FORMAT("file://{}", resolvedPath.value().toString());
105}
106
107Result<Path> DiskCacheImpl::resolveAbsolutePath(const Path& path, bool isRead) const {
108 auto newPath = !path.isAbsolute() ? _rootPath.appending(path) : path;

Callers 4

getModuleEntryMethod · 0.45
onPopulateFailureMethod · 0.45

Calls 4

getGlobalFunction · 0.85
makeStringMethod · 0.80
toStringMethod · 0.65
valueMethod · 0.65

Tested by

no test coverage detected