// imagePath returns the storage path for the specified image.
187347
func imagePath(kind, series, arch, checksum string) string {
	return fmt.Sprintf("images/%s-%s-%s:%s", kind, series, arch, checksum)
}
832599
func AssetsPath() string {
	if caddyPath := os.Getenv("CADDYPATH"); caddyPath != "" {
		return caddyPath
	}
	return filepath.Join(userHomeDir(), ".caddy")
}
927791
func (f *FileNameV3) Path() string {
	return (&FileName{Name: f.Name, Length: f.Length}).Path()
}
718329
func libraryPath(l *library.Library, id string) string {
	// DatastoreID (moref) format is "$local-path@$ds-folder-id",
	// see simulator.HostDatastoreSystem.CreateLocalDatastore
	ds := strings.SplitN(l.Storage[0].DatastoreID, "@", 2)[0]
	return path.Join(append([]string{ds, "contentlib-" + l.ID}, id)...)
}
161333
func BinPath() (string, error) {
	exePath, err := os.Executable()
	if err != nil {
		return "", err
	}
	return filepath.EvalSymlinks(exePath)
}
1068484
func ParseIconPath(fullpath string) (string, *color.RGBA, int) {
	fullpath = percentDecode(fullpath)

	_, filename := path.Split(fullpath)
	filename = strings.TrimSuffix(filename, ".png")
	params := strings.Split(filename, "-")
	if len(params) < 1 || len(params[0]) < 1 {
		return "", nil, -1
	}

	charParam := firstRune(params[0])
	sizeParam := ""
	if len(params) >= 2 {
		sizeParam = params[1]
	}
	colorParam := ""
	if len(params) >= 3 {
		colorParam = params[2]
	}

	size, err := strconv.Atoi(sizeParam)
	if err != nil || size < 0 {
		size = defaultIconSize
	}
	if size > maxIconSize {
		size = maxIconSize
	}

	col, _ := ColorFromHex(colorParam)
	if col == nil {
		col = DefaultBackgroundColor
	}

	return charParam, col, size
}
79584
func (a App) CachePath(file string) string {
	return a.path("XDG_CACHE_HOME", CacheHome, file)
}
1291955
func (s *Store) Path() string {
	if s.url == nil {
		return ""
	}
	return s.url.Path
}
1030116
func (material *Material) ImageUpload(filename string) (url string, err error) {
	var accessToken string
	accessToken, err = material.GetAccessToken()
	if err != nil {
		return
	}

	uri := fmt.Sprintf("%s?access_token=%s", mediaUploadImageURL, accessToken)
	var response []byte
	response, err = util.PostFile("media", filename, uri)
	if err != nil {
		return
	}
	var image resMediaImage
	err = json.Unmarshal(response, &image)
	if err != nil {
		return
	}
	if image.ErrCode != 0 {
		err = fmt.Errorf("UploadImage error : errcode=%v , errmsg=%v", image.ErrCode, image.ErrMsg)
		return
	}
	url = image.URL
	return

}
658711
func GenericPath(mg MinimalGraphics, x, y []int, style Style) {
	n := imin(len(x), len(y))
	for i := 1; i < n; i++ {
		mg.Line(x[i-1], y[i-1], x[i], y[i], style)
	}
}
1183685
func (b *binary) Path(parts ...string) string {
	args := make([]string, len(parts)+1)
	args[0] = b.workDir
	args = append(args, parts...)
	return filepath.Join(args...)
}
181452
func (r *REST) imageFor(ctx context.Context, tag string, imageStream *imageapi.ImageStream) (*imageapi.Image, error) {
	event := imageapi.LatestTaggedImage(imageStream, tag)
	if event == nil || len(event.Image) == 0 {
		return nil, kapierrors.NewNotFound(imagegroup.Resource("imagestreamtags"), imageapi.JoinImageStreamTag(imageStream.Name, tag))
	}

	return r.imageRegistry.GetImage(ctx, event.Image, &metav1.GetOptions{})
}
443329
func (u *DockerRegistryURL) Path() string {
	if u.Tag == "" {
		return u.ImageName
	} else {
		return fmt.Sprintf("%s:%s", u.ImageName, u.Tag)
	}
}
629652
func Convert_v1_ImageSourcePath_To_build_ImageSourcePath(in *v1.ImageSourcePath, out *build.ImageSourcePath, s conversion.Scope) error {
	return autoConvert_v1_ImageSourcePath_To_build_ImageSourcePath(in, out, s)
}
367924
func GetJujuOCIImagePath(controllerCfg controller.Config, ver version.Number) string {
	// First check the deprecated "caas-operator-image-path" config.
	imagePath := rebuildOldOperatorImagePath(
		controllerCfg.CAASOperatorImagePath(), ver,
	)
	if imagePath != "" {
		return imagePath
	}
	return imageRepoToPath(controllerCfg.CAASImageRepo(), ver)
}
741464
func (loc *Location) Path() string {
	return filepath.Join(
		loc.opts.publicPath,
		loc.opts.sitemapsPath,
		loc.Filename(),
	)
}
806254
func Path(path string, val ...interface{}) Filter {
	if len(val) > 0 {
		return Filter{Path: path, Val: val[0]}
	}

	return Filter{Path: path}
}