| 96 | } |
| 97 | |
| 98 | StringBox 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 | |
| 107 | Result<Path> DiskCacheImpl::resolveAbsolutePath(const Path& path, bool isRead) const { |
| 108 | auto newPath = !path.isAbsolute() ? _rootPath.appending(path) : path; |
no test coverage detected