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

Method WriteFile

pkg/repo/v1/index.go:245–251  ·  view source on GitHub ↗

WriteFile writes an index file to the given destination path. The mode on the file is set to 'mode'.

(dest string, mode os.FileMode)

Source from the content-addressed store, hash-verified

243//
244// The mode on the file is set to 'mode'.
245func (i IndexFile) WriteFile(dest string, mode os.FileMode) error {
246 b, err := yaml.Marshal(i)
247 if err != nil {
248 return err
249 }
250 return fileutil.AtomicWriteFile(dest, bytes.NewReader(b), mode)
251}
252
253// WriteJSONFile writes an index file in JSON format to the given destination
254// path.

Callers 1

TestIndexWriteFunction · 0.95

Calls 1

AtomicWriteFileFunction · 0.92

Tested by 1

TestIndexWriteFunction · 0.76