A class representing a normalized absolute file:// URI.
This is a subclass of url.URL with the following extra checks:
The protocol is file:.
The pathname does not contain consecutive slashes (a//b) ("normalization").
The pathname does not contain the . or .. segments (enforced by url.URL already).
The host localhost is represented as the empty string (enforced by url.URL already).
This class extends url.URL. This means that you can pass it to any
function expecting a url.URL. It also means that the URI is always
absolute.
Notes:
A single trailing slash is allowed.
The hostname is allowed to be any string. A non-empty string is used by Windows to represents
files on a network drive. An empty string means localhost.
The username, password and port properties are always "" (enforced by url.URL
already). This implies that host only contains hostname.
The search and hash properties can have any value.
A class representing a normalized absolute
file://
URI.This is a subclass of
url.URL
with the following extra checks:file:
.a//b
) ("normalization")..
or..
segments (enforced byurl.URL
already).localhost
is represented as the empty string (enforced byurl.URL
already).This class extends
url.URL
. This means that you can pass it to any function expecting aurl.URL
. It also means that the URI is always absolute.Notes:
localhost
.username
,password
andport
properties are always""
(enforced byurl.URL
already). This implies thathost
only containshostname
.search
andhash
properties can have any value.