of
Parses string into a Url, e.g. Url.of("https://example.com/page").
As a fallback for bare filesystem paths (which are not well-formed URLs on their own), if string fails to parse as-is, parsing is retried after prefixing it with "file://"; this is what lets it.unibo.tuprolog.solve.libs.io.primitives.IOPrimitiveUtils.ensuringArgumentIsUrl accept both open('file:///tmp/x.pl', ...) and open('/tmp/x.pl', ...) (or a relative path) as valid source/sinks.
Throws
if string is not a well-formed URL even after the file:// fallback.