// PathInPublic returns path to combine sitemapsPath and Filename on website.
// It also indicates where url file path is.
191100
func (loc *Location) PathInPublic() string {
	return filepath.Join(
		loc.opts.sitemapsPath,
		loc.Filename(),
	)
}
2929
func isPathInPrefixList(path string, prefix []string) bool {
	for _, p := range prefix {
		if strings.HasPrefix(path, p+"/") {
			return false
		}
	}
	return true
}
944987
func (p *PathSpec) AbsURL(in string, addLanguage bool) string {
	url, err := url.Parse(in)
	if err != nil {
		return in
	}

	if url.IsAbs() || strings.HasPrefix(in, "//") {
		return in
	}

	var baseURL string
	if strings.HasPrefix(in, "/") {
		u := p.BaseURL.URL()
		u.Path = ""
		baseURL = u.String()
	} else {
		baseURL = p.BaseURL.String()
	}

	if addLanguage {
		prefix := p.GetLanguagePrefix()
		if prefix != "" {
			hasPrefix := false
			// avoid adding language prefix if already present
			if strings.HasPrefix(in, "/") {
				hasPrefix = strings.HasPrefix(in[1:], prefix)
			} else {
				hasPrefix = strings.HasPrefix(in, prefix)
			}

			if !hasPrefix {
				addSlash := in == "" || strings.HasSuffix(in, "/")
				in = path.Join(prefix, in)

				if addSlash {
					in += "/"
				}
			}
		}
	}
	return MakePermalink(baseURL, in).String()
}
1102895
func (s *stackContext) renderPublic(inner error) string {
	switch {
	case inner == nil:
		return s.reason
	case s.reason == "":
		return inner.Error()
	}
	return fmt.Sprintf("%s: %s", s.reason, inner.Error())
}
1075645
func walkDirectories(path string, walkFunc func(path string, info os.FileInfo) error) error {
	seen := make(map[string]bool)

	var walkHelper func(path string) error
	walkHelper = func(path string) error {
		qualifiedPath, err := realpath.Realpath(path)
		if err != nil {
			return err
		}

		// Prevent circular links.
		if seen[qualifiedPath] {
			return nil
		}
		seen[qualifiedPath] = true

		// Skip anything that isn't a directory.
		file, err := os.Stat(path)
		if err != nil {
			return err
		}
		if !file.IsDir() {
			return nil
		}

		err = walkFunc(path, file)
		if err != nil {
			if err == filepath.SkipDir {
				return nil
			}
			return err
		}

		files, err := ioutil.ReadDir(path)
		if err != nil {
			return err
		}

		for _, file := range files {
			err = walkHelper(filepath.Join(path, file.Name()))
			if err != nil {
				return err
			}
		}
		return nil
	}
	return walkHelper(path)
}
681436
func (api *Client) RevokeFilePublicURL(fileID string) (*File, error) {
	return api.RevokeFilePublicURLContext(context.Background(), fileID)
}
43908
func (perm *Permissions) AddPublicPath(prefix string) {
	perm.publicPathPrefixes = append(perm.publicPathPrefixes, prefix)
}
1257187
func FindInPath(plugin string, paths []string) (string, error) {
	if plugin == "" {
		return "", fmt.Errorf("no plugin name provided")
	}

	if len(paths) == 0 {
		return "", fmt.Errorf("no paths provided")
	}

	for _, path := range paths {
		for _, fe := range ExecutableFileExtensions {
			fullpath := filepath.Join(path, plugin) + fe
			if fi, err := os.Stat(fullpath); err == nil && fi.Mode().IsRegular() {
				return fullpath, nil
			}
		}
	}

	return "", fmt.Errorf("failed to find plugin %q in path %s", plugin, paths)
}
1029909
func URLOpaquePath(u *url.URL) string {
	if u.Opaque != "" {
		return u.Opaque
	}
	return u.Path
}
1082005
func (e *Endpoint) BPFConfigMapPath() string {
	return bpf.LocalMapPath(bpfconfig.MapNamePrefix, e.ID)
}
708484
func (e *FileWalkEntry) Path() string {
	return filepath.Join(e.Dir, e.FileInfo.Name())
}
671587
func (api *API) ListPublicIps(args ...interface{}) ([]PublicIp, error) {
	url, err := processQueryParams(createUrl(api, publicIpPathSegment), args...)
	if err != nil {
		return nil, err
	}
	result := []PublicIp{}
	err = api.Client.Get(url, &result, http.StatusOK)
	if err != nil {
		return nil, err
	}
	for index, _ := range result {
		result[index].api = api
	}
	return result, nil
}
984410
func (l *Location) buildFindPath(endpoint string) string {
	path := fmt.Sprintf("%s/v1/locations/", endpoint)

	if l.Provider != "" {
		path = fmt.Sprintf("%s%s", path, l.Provider)

		if l.Region != "" {
			path = fmt.Sprintf("%s/%s", path, l.Region)
		}
	}

	return path
}
1318814
func (b *Builder) PathPrefix(pathPrefix string) *Builder {
	b.pathPrefix = pathPrefix
	return b
}
289431
func (f *Feeds) GetCurrentUserPublicURL() string {
	if f == nil || f.CurrentUserPublicURL == nil {
		return ""
	}
	return *f.CurrentUserPublicURL
}
1277966
func (o *Organization) GetPublicMembersURL() string {
	if o == nil || o.PublicMembersURL == nil {
		return ""
	}
	return *o.PublicMembersURL
}
1167999
func (c *DOM) PushNodeByPathToFrontend(path string) (int, error) {
	var v DOMPushNodeByPathToFrontendParams
	v.Path = path
	return c.PushNodeByPathToFrontendWithParams(&v)
}