MCPcopy
hub / github.com/helm/helm / ensureDirectoryForFile

Function ensureDirectoryForFile

pkg/action/install.go:753–761  ·  view source on GitHub ↗

check if the directory exists to create file. creates if doesn't exist

(file string)

Source from the content-addressed store, hash-verified

751
752// check if the directory exists to create file. creates if doesn't exist
753func ensureDirectoryForFile(file string) error {
754 baseDir := filepath.Dir(file)
755 _, err := os.Stat(baseDir)
756 if err != nil && !errors.Is(err, fs.ErrNotExist) {
757 return err
758 }
759
760 return os.MkdirAll(baseDir, defaultDirectoryPermission)
761}
762
763// NameAndChart returns the name and chart that should be used.
764//

Callers 1

writeToFileFunction · 0.70

Calls 2

IsMethod · 0.80
DirMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…