// OptSrcPath sets the path name for the file or directory to use for source
// data.
488441
func OptSrcPath(pathname string) SrcOption {
	return func(s *Source) error {
		info, err := os.Stat(pathname)
		if err != nil {
			return errors.Wrap(err, "statting path")
		}
		if info.IsDir() {
			infos, err := ioutil.ReadDir(pathname)
			if err != nil {
				return errors.Wrap(err, "reading directory")
			}
			s.files = make([]string, 0, len(infos))
			for _, info = range infos {
				s.files = append(s.files, path.Join(pathname, info.Name()))
			}
		} else {
			s.files = []string{pathname}
		}
		return nil
	}
}
1072397
func RunDirPath(dirPath string, args ...string) error {
	return RunIODirPath(IO{}, dirPath, args...)
}
539022
func OptsFromPeerConfig(peerCfg *fab.PeerConfig) []options.Opt {

	opts := []options.Opt{
		WithHostOverride(getServerNameOverride(peerCfg)),
		WithFailFast(getFailFast(peerCfg)),
		WithKeepAliveParams(getKeepAliveOptions(peerCfg)),
		WithCertificate(peerCfg.TLSCACert),
	}
	if isInsecureAllowed(peerCfg) {
		opts = append(opts, WithInsecure())
	}

	return opts
}
219554
func (fs FS) Path(p ...string) string {
	return path.Join(append([]string{string(fs)}, p...)...)
}
70145
func installSource(src, dst string, edit editFunc) error {
	return filepath.Walk(src, func(path string, info os.FileInfo, err error) error {
		if err != nil {
			return err
		}

		relpath, err := filepath.Rel(src, path)
		if err != nil {
			return fmt.Errorf("failed to get relative path [%s]: %s", path, err)
		}

		dstpath := filepath.Join(dst, relpath)
		switch {
		case info.IsDir():
			// Make sure the directory exists in the target filesystem.
			if err := ensureDirectory(dstpath); err != nil {
				return fmt.Errorf("failed to ensure directory [%s]: %s", dstpath, err)
			}

		case !info.Mode().IsRegular():
			// Skip non-regular files.
			break

		default:
			// Copy the file from source to destination.
			if err := copyFile(path, dstpath, relpath, edit); err != nil {
				return fmt.Errorf("failed to copy file ([%s] => [%s]): %s", path, dstpath, err)
			}
		}

		return nil
	})
}
124520
func (s *BaseStorage) Path(filepath string) string {
	return path.Join(s.Location, filepath)
}
192697
func (r *Root) scopedPath(realPath string) bool {
	// Volumes path for Docker version >= 1.7
	if strings.HasPrefix(realPath, filepath.Join(r.scope, volumesPathName)) && realPath != filepath.Join(r.scope, volumesPathName) {
		return true
	}

	// Volumes path for Docker version < 1.7
	if strings.HasPrefix(realPath, filepath.Join(r.scope, oldVfsDir)) {
		return true
	}

	return false
}
1131078
func Path(baseDir string, name string) string {
	key := repoKeyStr(name)
	return filepath.Join(baseDir, key)
}
1255927
func (g *GopathTest) Path(pkg string) string {
	return filepath.Join(g.base, "src", pkg)
}
684364
func SassOptionSetIncludePath(goopts SassOptions, path string) {
	C.sass_option_set_include_path(goopts, C.CString(path))
}
596201
func ConfigDirPath(projectDirPath string) (string, error) {
	if projectDirPath == "" {
		return "", errors.Errorf("projectDirPath was empty")
	}
	wrapper, err := specdir.New(projectDirPath, layout.WrapperSpec(), nil, specdir.Validate)
	if err != nil {
		return "", err
	}
	return wrapper.Path(layout.WrapperConfigDir), nil
}
352168
func (_m *DFS) DfPath(path string, excludes []string) (uint64, error) {
	ret := _m.Called(path, excludes)

	var r0 uint64
	if rf, ok := ret.Get(0).(func(string, []string) uint64); ok {
		r0 = rf(path, excludes)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(uint64)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(string, []string) error); ok {
		r1 = rf(path, excludes)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}
1052095
func (s *Service) confPath() string {
	return path.Join(InitDir, s.Service.Name+".conf")
}
1183685
func (b *binary) Path(parts ...string) string {
	args := make([]string, len(parts)+1)
	args[0] = b.workDir
	args = append(args, parts...)
	return filepath.Join(args...)
}
1227417
func adjustSourcePath(path string) (*os.File, string, error) {
	path = trimPath(path)
	f, err := os.Open(path)
	if err == nil {
		return f, path, nil
	}

	if dir, wderr := os.Getwd(); wderr == nil {
		for {
			parent := filepath.Dir(dir)
			if parent == dir {
				break
			}
			if f, err := os.Open(filepath.Join(parent, path)); err == nil {
				return f, filepath.Join(parent, path), nil
			}

			dir = parent
		}
	}

	return nil, path, err
}
1159612
func OptionResolvConfPath(path string) SandboxOption {
	return func(sb *sandbox) {
		sb.config.resolvConfPath = path
	}
}
335225
func trimSrcPath(absPath, srcPath string) string {
	relPath, err := filepath.Rel(srcPath, absPath)
	if err != nil {
		er(err)
	}
	return relPath
}