MCPcopy Index your code
hub / github.com/helm/helm / createOrOpenFile

Function createOrOpenFile

pkg/action/install.go:745–750  ·  view source on GitHub ↗
(filename string, appendData bool)

Source from the content-addressed store, hash-verified

743}
744
745func createOrOpenFile(filename string, appendData bool) (*os.File, error) {
746 if appendData {
747 return os.OpenFile(filename, os.O_APPEND|os.O_WRONLY, 0600)
748 }
749 return os.Create(filename)
750}
751
752// check if the directory exists to create file. creates if doesn't exist
753func ensureDirectoryForFile(file string) error {

Callers 1

writeToFileFunction · 0.70

Calls 1

CreateMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…