Lines Matching defs:uri
35 func (uri URI) Filename() string {
36 filename, err := filename(uri)
43 func filename(uri URI) (string, error) {
44 if uri == "" {
47 u, err := url.ParseRequestURI(string(uri))
52 return "", fmt.Errorf("only file URIs are supported, got %q from %q", u.Scheme, uri)
61 // It will attempt to detect if the string is a file path or uri.
137 uri := u.String()
138 if unescaped, err := url.PathUnescape(uri); err == nil {
139 uri = unescaped
141 return URI(uri)
157 func isWindowsDriveURI(uri string) bool {
158 if len(uri) < 4 {
161 return uri[0] == '/' && unicode.IsLetter(rune(uri[1])) && uri[2] == ':'