// relPath creates the relative path to this index (`_api/user/<name>`)
960756
func (u *user) relPath() string {
	escapedName := pathEscape(u.data.Name)
	return path.Join("_api", "user", escapedName)
}
741464
func (loc *Location) Path() string {
	return filepath.Join(
		loc.opts.publicPath,
		loc.opts.sitemapsPath,
		loc.Filename(),
	)
}
420771
func IsRelativePath(pth string) bool {
	if strings.HasPrefix(pth, "./") {
		return true
	}

	if strings.HasPrefix(pth, "/") {
		return false
	}

	if strings.HasPrefix(pth, "$") {
		return false
	}

	return true
}
513639
func (v *view) relPath() string {
	escapedName := pathEscape(v.name)
	return path.Join(v.db.relPath(), "_api", "view", escapedName)
}
19100
func (i *VCSInstaller) Path() string {
	return filepath.Join(i.Home.Rigs(), i.Name)
}
27777
func v1APIPath(path string) string {
	if !strings.HasPrefix(path, "/") {
		path = V1APIPrefix + path
	}
	return (&url.URL{Path: path}).String()
}
205708
func (r *RepositoryLicense) GetPath() string {
	if r == nil || r.Path == nil {
		return ""
	}
	return *r.Path
}
324438
func (cli *Client) getAPIPath(ctx context.Context, p string, query url.Values) string {
	var apiPath string
	if cli.negotiateVersion && !cli.negotiated {
		cli.NegotiateAPIVersion(ctx)
	}
	if cli.version != "" {
		v := strings.TrimPrefix(cli.version, "v")
		apiPath = path.Join(cli.basePath, "/v"+v, p)
	} else {
		apiPath = path.Join(cli.basePath, p)
	}
	return (&url.URL{Path: apiPath, RawQuery: query.Encode()}).String()
}
871558
func GetRootPath(name string) string {
	for prefix, num := range setting.RootPathPairs {
		if strings.HasPrefix(name, prefix) {
			return joinPath(name, num)
		}
	}

	if strings.HasPrefix(name, "gopkg.in") {
		m := gopkgPathPattern.FindStringSubmatch(strings.TrimPrefix(name, "gopkg.in"))
		if m == nil {
			return name
		}
		user := m[1]
		repo := m[2]
		return path.Join("gopkg.in", user, repo+"."+m[3])
	}
	return name
}
690686
func pidPath(dir, id string) string {
	// If no directory is given we do not write a pid
	if dir == "" {
		return ""
	}

	return filepath.Join(dir, fmt.Sprintf("%s.pid", id))
}
208824
func (ns *NetworkSpec) Path() string {
	name := ns.Name
	if name == "" {
		name = networkDefaultName
	}
	return networkPathRoot + name
}
1147189
func (d *database) relPath() string {
	escapedName := pathEscape(d.name)
	return path.Join("_db", escapedName)
}
672545
func FuncPath(i interface{}) (pkgName string, objName string, funcName string) {
	s := FuncName(i)
	_, file := path.Split(s)
	return ParseFuncName(file)
}
922803
func (r *Router) subPath(p string) string {
	pre := r.prefix

	if (pre == "/" || pre[:len(pre)-1] == "/") && p[:1] == "/" {
		pre = pre[:len(pre)-1]
	}

	return pre + p
}
1350835
func catpath(path, name string) string {
	if path == "" {
		return name
	}
	return strings.Join([]string{path, name}, ".")
}
914290
func (s *Sandbox) UserNsPath() string {
	if s.infraContainer != nil {
		return fmt.Sprintf("/proc/%v/ns/user", s.infraContainer.State().Pid)
	}
	return ""
}
1331318
func WikiPath(userName, repoName string) string {
	return filepath.Join(UserPath(userName), strings.ToLower(repoName)+".wiki.git")
}