file-URI       = file-scheme ":" file-hier-part

file-scheme    = "file"

file-hier-part = ( "//" auth-path )
               / local-path

auth-path      = [ file-auth ] path-absolute
               / [ file-auth ] file-absolute
               / unc-authority path-absolute

local-path     = [ drive-letter ] path-absolute
               / file-absolute

file-auth      = "localhost"
               / [ userinfo "@" ] host

unc-authority  = 2*3"/" file-host

file-host      = inline-IP / IPv4address / reg-name

inline-IP      = "%5B" ( IPv6address / IPvFuture ) "%5D"

file-absolute  = "/" drive-letter path-absolute

drive-letter   = ALPHA ":"
               / ALPHA "|"
