INNER CODE UNIT · Go

fileExists

roboll/helmfile · pkg/app/app.go:1959

func fileExists(path string) (bool, error) {
	_, err := os.Stat(path)

	if err != nil {
		if os.IsNotExist(err) {
			return false, nil
		}
		return false, err
	}
	return true, nil
}

func directoryExistsAt(path string) bool {
	fileInfo, err := os.Stat(path)
	return err == nil && fileInfo.Mode().IsDir()
}

type Error struct {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…