code: func urlParse(name string) *url.URL {
  	var info os.FileInfo
  
  	u, err := url.Parse(name)
  	if err == nil && u.Scheme == "" {
  		info, err = os.Stat(u.Path)
  		if err == nil && info.IsDir() {
  			u.Scheme = ArchiveScheme // special case for IsDir()
  			return u
  		}
  	}
  
  	u, err = url.Parse(strings.TrimPrefix(name, "/")) // must appear to be an absolute path or hgfs errors
  	if err != nil {
  		u = &url.URL{Path: name}
  	}
  
  	if u.Scheme == "" {
  		ix := strings.Index(u.Path, "/")
  		if ix > 0 {
  			u.Scheme = u.Path[:ix]
  			u.Path = u.Path[ix:]
  		}
  	}
  
  	return u
  }
docs: // urlParse attempts to convert the given name to a URL with scheme for use as FileHandler dispatch.