// documentPaths parses all paths in a framework.Backend into OpenAPI paths.
435350
func documentPaths(backend *Backend, doc *OASDocument) error {
	for _, p := range backend.Paths {
		if err := documentPath(p, backend.SpecialPaths(), backend.BackendType, doc); err != nil {
			return err
		}
	}

	return nil
}
240169
func (r *runtimeVerbose) pathFromGopath(path string) string {
	return filepath.Dir(path[len(r.Gopath)+len("/src/"):])
}
418226
func kvPaths(b *backend) []*framework.Path {
	return []*framework.Path{
		&framework.Path{
			Pattern: "kv/?",
			Callbacks: map[logical.Operation]framework.OperationFunc{
				logical.ListOperation: b.pathKVList,
			},
		},
		&framework.Path{
			Pattern: "kv/" + framework.GenericNameRegex("key"),
			Fields: map[string]*framework.FieldSchema{
				"key":     &framework.FieldSchema{Type: framework.TypeString},
				"value":   &framework.FieldSchema{Type: framework.TypeString},
				"version": &framework.FieldSchema{Type: framework.TypeInt},
			},
			ExistenceCheck: b.pathExistenceCheck,
			Callbacks: map[logical.Operation]framework.OperationFunc{
				logical.ReadOperation:   b.pathKVRead,
				logical.CreateOperation: b.pathKVCreateUpdate,
				logical.UpdateOperation: b.pathKVCreateUpdate,
				logical.DeleteOperation: b.pathKVDelete,
			},
		},
	}
}
406618
func NewPaths(dataDir string, unitTag names.UnitTag) Paths {
	return NewWorkerPaths(dataDir, unitTag, "")
}
229637
func trimPaths(paths []cty.Path) []cty.Path {
	var trimmed []cty.Path
	for _, path := range paths {
		path = trimPath(path)
		if len(path) > 0 {
			trimmed = append(trimmed, path)
		}
	}
	return trimmed
}
383274
func GetAllPaths(y *simpleyaml.Yaml) ([]string, error)  {
	InitialPath := make([]string, 0)
	AllPaths, err :=  GetAllExistingPaths(y, InitialPath)
	if err != nil {
		return nil, errors.New("Retrieving paths failed")
	}
	return AllPaths, nil
}
815463
func (s *FieldSort) NestedPath(nestedPath string) *FieldSort {
	s.path = &nestedPath
	return s
}
574002
func appSearchPaths(p *stage1commontypes.Pod, workDir string, app types.App) []string {
	appEnv := app.Environment

	if imgPath, ok := appEnv.Get("PATH"); ok {
		return strings.Split(imgPath, ":")
	}

	// emulate exec(3) behavior, first check working directory and then the
	// list of directories returned by confstr(_CS_PATH). That's typically
	// "/bin:/usr/bin" so let's use that.
	return []string{workDir, "/bin", "/usr/bin"}
}
1103324
func ParsePathsFromArgs() {
	flag.Parse()
	for _, dir := range flag.Args() {
		var conf loader.Config
		conf.ParserMode = parser.ParseComments
		conf.ImportWithTests(dir)
		prog, err := conf.Load()
		if err != nil {
			panic(err)
		}

		r := renamer{prog, map[*token.File]bool{}}
		r.parse()
		if !*dryRun {
			r.write()
		}
	}
}
1025461
func rootedPaths(args []string) []string {
	pathConverter, err := lfs.NewCurrentToRepoPathConverter(cfg)
	if err != nil {
		Panic(err, "Could not checkout")
	}

	rootedpaths := make([]string, 0, len(args))
	for _, arg := range args {
		rootedpaths = append(rootedpaths, pathConverter.Convert(arg))
	}
	return rootedpaths
}
904084
func (p *PathStruct) Paths() []*Path {
	// The single path we support to read/write this config
	path := &Path{
		Pattern: p.Path,
		Fields:  p.Schema,

		Callbacks: map[logical.Operation]OperationFunc{
			logical.CreateOperation: p.pathWrite(),
			logical.UpdateOperation: p.pathWrite(),
			logical.DeleteOperation: p.pathDelete(),
		},

		ExistenceCheck: p.pathExistenceCheck(),

		HelpSynopsis:    p.HelpSynopsis,
		HelpDescription: p.HelpDescription,
	}

	// If we support reads, add that
	if p.Read {
		path.Callbacks[logical.ReadOperation] = p.pathRead()
	}

	return []*Path{path}
}
612447
func createPaths(mode byte, paths *MvcPath) {
	if (mode & OModel) == OModel {
		os.Mkdir(paths.ModelPath, 0777)
	}
	if (mode & OController) == OController {
		os.Mkdir(paths.ControllerPath, 0777)
	}
	if (mode & ORouter) == ORouter {
		os.Mkdir(paths.RouterPath, 0777)
	}
}
1278153
func (l *Client) GetDocuments(urls []string, limit int) (Documents, error) {
	res := ApiResp{}
	data := Documents{}
	params := url.Values{}

	if limit > 0 {
		params.Add("limit", strconv.Itoa(limit))
	}

	if len(urls) > 0 {
		params.Add("urls", strings.Join(urls, ","))
	}

	err := l.Get(documentsEndpoint, params, nil, &res, &data)
	if err != nil {
		return data, err
	}

	return data, nil
}
178576
func (ix *IndexWriter) AddPaths(paths []string) {
	ix.paths = append(ix.paths, paths...)
}
86553
func normalizePaths(paths []string) ([]string, string, error) {
	namenode := ""
	cleanPaths := make([]string, 0, len(paths))

	for _, rawurl := range paths {
		url, err := url.Parse(rawurl)
		if err != nil {
			return nil, "", err
		}

		if url.Host != "" {
			if namenode != "" && namenode != url.Host {
				return nil, "", errMultipleNamenodeUrls
			}

			namenode = url.Host
		}

		cleanPaths = append(cleanPaths, path.Clean(url.Path))
	}

	return cleanPaths, namenode, nil
}
73978
func pathListCertificates(b *backend) *framework.Path {
	return &framework.Path{
		Pattern: "config/certificates/?",

		Callbacks: map[logical.Operation]framework.OperationFunc{
			logical.ListOperation: b.pathCertificatesList,
		},

		HelpSynopsis:    pathListCertificatesHelpSyn,
		HelpDescription: pathListCertificatesHelpDesc,
	}
}
487321
func resolveRelativePaths(paths []*string, root string) {
	for _, path := range paths {
		// leave empty paths alone, "no path" is a valid input
		// do not attempt to resolve paths that are already absolute
		if len(*path) > 0 && !filepath.IsAbs(*path) {
			*path = filepath.Join(root, *path)
		}
	}
}