return None
return
"""
Convert a path to a file: URL. The path will be made absolute and have
quoted path parts.
"""
=
=
return
"""
Convert a file: URL to a path.
"""
assert , f
, , , , =
# According to RFC 8089, same as empty authority.
=
:
# If we have a UNC path, prepend UNC share notation.
= +
=
# On Windows, urlsplit parses the path as something like "/C:/Users/foo".
# This creates issues for path-related functions like io.open(), so we try
# to detect and strip the leading slash.
=
return