OpamUrlSourceURL parsing and printing, with support for our different backends
Same as of_string, but allows enforcing the expected backend, and may otherwise guess version control from the suffix by default (for e.g. https://foo/bar.git). (this should be disabled when parsing from files). Note that handle_suffix also handles user-name in ssh addresses (e.g. "ssh://git@github.com/...")
Returns the url string without the VC part (i.e. "git+foo://bar" returns "foo://bar")
The last part of the url path, e.g. "http://foo/bar/this" or "http://that.here/"
Returns the url with all path components but the first one (the hostname) dropped, e.g. "http://some.host/some/path" becomes "http://some.host"
Check if the URL matches an existing local directory, and return it
Check if the URL matches an existing local file, and return it
If the given url-string has no 'transport://' specification and corresponds to an existing local path, check for version-control clues at that path