// IsConfigDir returns true if and only if the given directory contains at
// least one Terraform configuration file. This is a wrapper around calling
// the same method name on the loader's parser.
432638
func (l *Loader) IsConfigDir(path string) bool {
	return l.parser.IsConfigDir(path)
}
733859
func IsDir(path string) bool {
	f, err := os.Open(path)
	if err != nil {
		return false
	}
	defer func() {
		errutil.Trace(f.Close())
	}()

	fi, err := f.Stat()
	if err != nil {
		return false
	}

	return fi.Mode().IsDir()
}
1111834
func IsDir(dirPath string) bool {
	fi, err := os.Stat(dirPath)
	if err == nil {
		return fi.IsDir()
	}
	return false
}
1177545
func (fs *Filespace) IsDir(subPath string) bool {
	return disk.IsDir(fs.path + subPath)
}
1134669
func (s *Store) IsDir(ctx context.Context, name string) bool {
	ls, err := s.List(ctx, name)
	if err != nil {
		return false
	}
	return len(ls) > 1
}
891186
func HasConfigDir(ctx context.Context) bool {
	_, ok := ctx.Value(ctxKeyConfigDir).(string)
	return ok
}
517961
func isSysErrNotDir(err error) bool {
	if err == syscall.ENOTDIR {
		return true
	}
	pathErr, ok := err.(*os.PathError)
	return ok && pathErr.Err == syscall.ENOTDIR
}
434900
func ensureDirectories(home helmpath.Home, out io.Writer) error {
	configDirectories := []string{
		home.String(),
		home.Repository(),
		home.Cache(),
		home.LocalRepository(),
		home.Plugins(),
		home.Starters(),
		home.Archive(),
	}
	for _, p := range configDirectories {
		if fi, err := os.Stat(p); err != nil {
			fmt.Fprintf(out, "Creating %s \n", p)
			if err := os.MkdirAll(p, 0755); err != nil {
				return fmt.Errorf("Could not create %s: %s", p, err)
			}
		} else if !fi.IsDir() {
			return fmt.Errorf("%s must be a directory", p)
		}
	}

	return nil
}
953195
func IsDirExists(pth string) (bool, error) {
	fileInf, isExists, err := genericIsPathExists(pth)
	if err != nil {
		return false, err
	}
	if !isExists {
		return false, nil
	}
	if fileInf == nil {
		return false, errors.New("No file info available")
	}
	return fileInf.IsDir(), nil
}
1357435
func IsDir(path string, fs afero.Fs) (bool, error) {
	return afero.IsDir(fs, path)
}
942143
func (d *DotGit) ConfigWriter() (billy.File, error) {
	return d.fs.Create(configPath)
}
1214546
func IsDir(fs Fs, path string) (bool, error) {
	fi, err := fs.Stat(path)
	if err != nil {
		return false, err
	}
	return fi.IsDir(), nil
}
427968
func (d *DotGit) Config() (billy.File, error) {
	return d.fs.Open(configPath)
}
525520
func (m *InMem) IsDir(ctx context.Context, name string) bool {
	m.Lock()
	defer m.Unlock()

	for k := range m.data {
		if strings.HasPrefix(k, name+"/") {
			return true
		}
	}
	return false
}
1081542
func (a *ArgoCDSettings) IsSSOConfigured() bool {
	if a.IsDexConfigured() {
		return true
	}
	if a.OIDCConfig() != nil {
		return true
	}
	return false
}
663417
func ConfigTmpDir() (string, error) {
	if tmpdir := os.Getenv("PACKER_TMP_DIR"); tmpdir != "" {
		return filepath.Abs(tmpdir)
	}
	configdir, err := packer.ConfigDir()
	if err != nil {
		return "", err
	}
	td := filepath.Join(configdir, "tmp")
	_, err = os.Stat(td)
	if os.IsNotExist(err) {
		if err = os.MkdirAll(td, 0755); err != nil {
			return "", err
		}
	} else if err != nil {
		return "", err
	}
	return td, nil
}
233399
func BuildDir(path string) option {
	return func(c *sass) error {
		c.ctx.BuildDir = path
		return nil
	}
}