// Path provides the full path of the file, despite RelativeType or FullType. It
// will be in Unvis'd form.
182248
func (e Entry) Path() (string, error) {
	decodedName, err := govis.Unvis(e.Name, DefaultVisFlags)
	if err != nil {
		return "", err
	}
	decodedName = CleanPath(decodedName)
	if e.Parent == nil || e.Type == FullType {
		return decodedName, nil
	}
	parentName, err := e.Parent.Path()
	if err != nil {
		return "", err
	}
	return CleanPath(filepath.Join(parentName, decodedName)), nil
}
873714
func (v *Index) Path() string {
	ret := C.GoString(C.git_index_path(v.ptr))
	runtime.KeepAlive(v)
	return ret
}
708484
func (e *FileWalkEntry) Path() string {
	return filepath.Join(e.Dir, e.FileInfo.Name())
}
1347273
func (i HTTPInstaller) Path() string {
	if i.base.Source == "" {
		return ""
	}
	return filepath.Join(i.base.HelmHome.Plugins(), i.PluginName)
}
1199107
func (r *Router) Path(path string) *Route {
	return r.getOrCreateRoute(r.mux.Path(path), path)
}
1333624
func (c *Client) Path(path string) *Client {
	c.Use(url.Path(path))
	return c
}
694217
func Path(path string) option {
	return func(c *sass) error {
		c.srcFile = path
		c.ctx.MainFile = path
		return nil
	}
}
1020757
func (f *FileResourceLookup) ResolvePath(path, relativeTo string) string {
	vs := strings.SplitN(path, ":", 2)
	if len(vs) != 2 || filepath.IsAbs(vs[0]) {
		return path
	}
	vs[0] = relativePath(vs[0], relativeTo)
	return strings.Join(vs, ":")
}
532740
func (h Home) Path(elem ...string) string {
	p := []string{h.String()}
	p = append(p, elem...)
	return filepath.Join(p...)
}
652263
func relativePath(logPath string) string {
	cwd, cwdErr := os.Getwd()
	if cwdErr == nil {
		relPath := strings.TrimPrefix(logPath, cwd)
		if relPath != logPath {
			logPath = fmt.Sprintf(".%s", relPath)
		}
	}
	return logPath
}
271024
func (k Key) Path() Key {
	s := k.Parent().string + "/" + NamespaceType(k.BaseNamespace())
	return NewKey(s)
}
458808
func (i *LocalInstaller) Path() string {
	if i.Source == "" {
		return ""
	}
	return filepath.Join(i.Home.Rigs(), i.Name)
}
607642
func (m *Map) Path() (string, error) {
	if err := m.setPathIfUnset(); err != nil {
		return "", err
	}

	return m.path, nil
}
970970
func (xmlNode *XmlNode) Path() (path string) {
	pathPtr := C.xmlGetNodePath(xmlNode.Ptr)
	if pathPtr != nil {
		p := (*C.char)(unsafe.Pointer(pathPtr))
		defer C.xmlFreeChars(p)
		path = C.GoString(p)
	}
	return
}
775672
func (r *Store) Path() string {
	if r.url == nil {
		return ""
	}
	return r.url.Path
}
643090
func (u Util) JoinPath(path ...string) (string, error) {
	components := []string{}
	for _, tmp := range path {
		components = append(components, SplitPath(tmp)...)
	}
	last := components[len(components)-1]
	components = components[:len(components)-1]

	realpath := "/"
	for _, component := range components {
		tmp := filepath.Join(realpath, component)
		s, err := os.Lstat(filepath.Join(u.DestDir, tmp))
		if os.IsNotExist(err) {
			realpath = tmp
			continue
		} else if err != nil {
			return "", err
		}

		if s.Mode()&os.ModeSymlink == 0 {
			realpath = tmp
			continue
		}

		symlinkPath, err := os.Readlink(filepath.Join(u.DestDir, tmp))
		if err != nil {
			return "", err
		}
		if filepath.IsAbs(symlinkPath) {
			realpath = "/"
		}
		realpath = filepath.Join(realpath, symlinkPath)
	}

	return filepath.Join(u.DestDir, realpath, last), nil
}
743937
func (t *Trie) SplitPath(path string) (string, string) {
	var key string
	if path == "" {
		return key, path
	} else if path == "/" {
		return path, ""
	}
	for i := 0; i < len(path); i++ {
		if path[i] == '/' {
			if i == 0 {
				return t.SplitPath(path[1:])
			}
			if i > 0 {
				key = path[:i]
				path = path[i:]
				if path == "/" {
					return key, ""
				}
				return key, path
			}
		}
	}
	return path, ""
}