// getServerPath gets the path to the scsynth executable.
426004
func (s *Server) getServerPath() (string, error) {
	for _, file := range strings.Split(ServerPath, ":") {
		ok, err := isExecutable(file)
		if err != nil {
			return "", err
		}
		if ok {
			return file, nil
		}
	}

	path, hasPath := os.LookupEnv("PATH")
	if !hasPath {
		return "", ErrNoScsynth
	}

	for _, file := range strings.Split(path, ":") {
		ok, err := isExecutable(file)
		if err != nil {
			return "", err
		}
		if ok {
			return file, nil
		}
	}
	return "", ErrNoScsynth
}
544579
func (quobyteVolume *quobyte) GetPath() string {
	user := quobyteVolume.user
	if len(user) == 0 {
		user = "root"
	}

	group := quobyteVolume.group
	if len(group) == 0 {
		group = "nfsnobody"
	}

	// Quobyte has only one mount in the PluginDir where all Volumes are mounted
	// The Quobyte client does a fixed-user mapping
	pluginDir := quobyteVolume.plugin.host.GetPluginDir(utilstrings.EscapeQualifiedName(quobytePluginName))
	return filepath.Join(pluginDir, fmt.Sprintf("%s#%s@%s", user, group, quobyteVolume.volume))
}
581680
func GetServerInformation() (i ServerInformation, err error) {
	conn, err := dbus.SessionBus()
	if err != nil {
		return
	}

	obj := conn.Object(DbusInterfacePath, DbusObjectPath)
	call := obj.Call(CallGetServerInformation, 0)
	if err = call.Err; err != nil {
		return
	}

	err = call.Store(&i.Name, &i.Vendor, &i.Version, &i.SpecVersion)
	return
}
107347
func (c *CheckRunAnnotation) GetPath() string {
	if c == nil || c.Path == nil {
		return ""
	}
	return *c.Path
}
1374189
func (s *Svc) ServerPackagePath() string {
	return fmt.Sprintf("%s/%sserver", s.Module.ImportPath, strings.ToLower(s.Name))
}
1030394
func (dc *Datacenter) GetVMByPath(ctx context.Context, vmPath string) (*VirtualMachine, error) {
	finder := getFinder(dc)
	vm, err := finder.VirtualMachine(ctx, vmPath)
	if err != nil {
		klog.Errorf("Failed to find VM by Path. VM Path: %s, err: %+v", vmPath, err)
		return nil, err
	}
	virtualMachine := VirtualMachine{vm, dc}
	return &virtualMachine, nil
}
201387
func RequestPath(req *http.Request) (value string) {
	ex := getRequestExecution(req)
	return ex.pattern
}
1075653
func getServer() (string, error) {
	if s := os.Getenv("CAMLI_SERVER"); s != "" {
		return cleanServer(s)
	}
	if flagServer != "" {
		if !isURLOrHostPort(flagServer) {
			configOnce.Do(parseConfig)
			serverConf, ok := config.Servers[flagServer]
			if ok {
				return serverConf.Server, nil
			}
			log.Printf("%q looks like a server alias, but no such alias found in config.", flagServer)
		} else {
			return cleanServer(flagServer)
		}
	}
	server, err := defaultServer()
	if err != nil {
		return "", err
	}
	if server == "" {
		return "", camtypes.ErrClientNoServer
	}
	return cleanServer(server)
}
263161
func (e *Endpoint) DirectoryPath() string {
	return filepath.Join(".", fmt.Sprintf("%d", e.ID))
}
1083587
func (p *PagesSource) GetPath() string {
	if p == nil || p.Path == nil {
		return ""
	}
	return *p.Path
}
713209
func (ts *Store) GetPath(id string) string {
	return filepath.Join(ts.dir, id)
}
637520
func (c Config) GetEnginePath(base string) string {
	if c.EnginePath != "" {
		return c.EnginePath
	}
	return filepath.Join(base, DefaultEngineDirectoryName)
}
459978
func (r *Registry) GetServerFunc(stream string) (func(*Peer, string, bool) (Server, error), error) {
	r.serverMu.RLock()
	defer r.serverMu.RUnlock()

	f := r.serverFuncs[stream]
	if f == nil {
		return nil, fmt.Errorf("stream %v not registered", stream)
	}
	return f, nil
}
36745
func GetServerVersion(clientConn *grpc.ClientConn) (*Version, error) {
	return NewAPIClient(clientConn).GetVersion(
		context.Background(),
		&empty.Empty{},
	)
}
225893
func (sd *etcdServiceDiscovery) GetServer(id string) (*Server, error) {
	if sv, ok := sd.serverMapByID.Load(id); ok {
		return sv.(*Server), nil
	}
	return nil, constants.ErrNoServerWithID
}
235043
func (c *Client) GetFeedPath(stream, direction string, version int, pageSize int) (string, error) {
	ps := pageSize

	dir := ""
	switch direction {
	case "forward", "backward":
		dir = direction
	default:
		return "", fmt.Errorf("Invalid Direction %s. Allowed values are \"forward\" or \"backward\" \n", direction)
	}

	v := "head"
	if version >= 0 {
		v = strconv.Itoa(version)
	}

	if v == "head" && dir == "forward" {
		return "", fmt.Errorf("Invalid Direction (%s) and version (head) combination.\n", direction)
	}

	return fmt.Sprintf("/streams/%s/%s/%s/%d", stream, v, dir, ps), nil
}
430560
func (req *Request) GetPath() (path string) {
	path, _ = req.GetValue(ENGINE_PATH).(string)
	return
}