MCPcopy Index your code
hub / github.com/Moddable-OpenSource/moddable / pathToURL

Method pathToURL

tools/mcpack.js:650–654  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

648 return url.toString();
649 }
650 pathToURL(path) {
651 if (this.windows)
652 path = "/" + path.replaceAll('\\', '/');
653 return "file://" + path;
654 }
655 urlToDirectoryPath(href) {
656 const url = new URL(href);
657 if (url.protocol == "file:") {

Callers 1

runMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected