// chown modifies the given path to be owned by the given user.
// Implements PlatformStrategy.
423055
func (*WindowsStrategy) chown(c context.Context, path, username string) error {
	if err := exec.Command("icacls", path, "/setowner", username).Run(); err != nil {
		return errors.Annotate(err, "failed to set owner: %s", path).Err()
	}
	return nil
}
741464
func (loc *Location) Path() string {
	return filepath.Join(
		loc.opts.publicPath,
		loc.opts.sitemapsPath,
		loc.Filename(),
	)
}
1304267
func (c *Cookie) Path() *String {
	if c.chain.failed() {
		return &String{c.chain, ""}
	}
	return &String{c.chain, c.value.Path}
}
1279416
func (w *ledgerDriver) Derive(path accounts.DerivationPath) (common.Address, error) {
	return w.ledgerDerive(path)
}
1206867
func Path(path string) p.Plugin {
	return p.NewRequestPlugin(func(ctx *c.Context, h c.Handler) {
		ctx.Request.URL.Path = normalizePath(path)
		h.Next(ctx)
	})
}
1079701
func (api *APIBuilder) staticEmbedded(requestPath string, vdir string, assetFn func(name string) ([]byte, error), namesFn func() []string, assetsGziped bool) *Route {
	fullpath := joinPath(api.relativePath, requestPath)
	// if subdomain,
	// here we get the full path of the path only,
	// because a subdomain can have parties as well
	// and we need that path to call the `StripPrefix`.
	_, fullpath = splitSubdomainAndPath(fullpath)

	paramName := "file"
	requestPath = joinPath(requestPath, WildcardParam(paramName))

	h := StaticEmbeddedHandler(vdir, assetFn, namesFn, assetsGziped)

	if fullpath != "/" {
		h = StripPrefix(fullpath, h)
	}

	// it handles the subdomain(root Party) of this party as well, if any.
	return api.registerResourceRoute(requestPath, h)
}
526275
func (env *Env) Path() (string, error) {
	var cpath *C.char
	ret := C.mdb_env_get_path(env._env, &cpath)
	if ret != success {
		return "", operrno("mdb_env_get_path", ret)
	}
	if cpath == nil {
		return "", errNotOpen
	}
	return C.GoString(cpath), nil
}
208824
func (ns *NetworkSpec) Path() string {
	name := ns.Name
	if name == "" {
		name = networkDefaultName
	}
	return networkPathRoot + name
}
1087263
func (k *key) Path() path.Path {
	return path.New(ipfspath.Join([]string{"/ipns", k.peerID.Pretty()}))
}
133491
func ChownR(path string, uid, gid int) error {
	return filepath.Walk(path, func(name string, info os.FileInfo, err error) error {
		if err == nil {
			err = os.Chown(name, uid, gid)
		}
		return err
	})
}
1024886
func Path(version Version) (string, error) {
	return mongoPath(version, os.Stat, exec.LookPath)
}
10213
func (u *OfferURL) Path() string {
	var parts []string
	if u.User != "" {
		parts = append(parts, u.User)
	}
	if u.ModelName != "" {
		parts = append(parts, u.ModelName)
	}
	path := strings.Join(parts, "/")
	path = fmt.Sprintf("%s.%s", path, u.ApplicationName)
	if u.Source == "" {
		return path
	}
	return fmt.Sprintf("%s:%s", u.Source, path)
}
306773
func ExpandUser(path string) string {
	if u, err := user.Current(); err == nil {
		return strings.Replace(path, "~", u.HomeDir, -1)
	}
	return path
}
422807
func Path(browser, libpath string, globalInstall bool) (string, error) {
	location, err := getLocation(browser, libpath, globalInstall)
	if err != nil {
		return "", err
	}

	expanded, err := homedir.Expand(location)
	if err != nil {
		return "", err
	}

	return filepath.Join(expanded, Name+".json"), nil
}
311062
func (tracker *DefaultImportTracker) PathOf(localName string) (string, bool) {
	name, ok := tracker.nameToPath[localName]
	return name, ok
}
1156448
func Path(c *cli.Context) string {
	if c != nil {
		if ed := c.String("editor"); ed != "" {
			return ed
		}
	}
	if ed := os.Getenv("EDITOR"); ed != "" {
		return ed
	}
	// given, this is a very opinionated default, but this should be available
	// on virtually any UNIX system and the user can still set EDITOR to get
	// his favorite one
	return "vi"
}
969299
func (h *Hook) Path() string {
	return filepath.Join(h.Dir, h.Type)
}