MCPcopy Create free account
hub / github.com/facebook/Rapid / getFileURL

Method getFileURL

modules/core/AssetSystem.js:217–222  ·  view source on GitHub ↗

* getFileURL * Returns the URL for the given filename. * If the given value is already a URL, it's returned * If the given value is a relative path, return the real location of that file. * @param {string} val - asset path * @return {string} The real URL pointing to that filena

(val)

Source from the content-addressed store, hash-verified

215 * @return {string} The real URL pointing to that filename
216 */
217 getFileURL(val) {
218 if (/^http(s)?:\/\//i.test(val)) return val; // already a url
219
220 const filename = `${this.filePath}${val}`;
221 return this.fileReplacements[filename] || filename;
222 }
223
224
225 /**

Callers 8

getAssetURLMethod · 0.95
_checkEnvironmentMethod · 0.80
getThumbnailMethod · 0.80
constructorMethod · 0.80
uiWhatsNewFunction · 0.80
renderMethod · 0.80
loadingFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected