MCPcopy
hub / github.com/carvel-dev/ytt / asFiles

Method asFiles

pkg/cmd/template/data_values_flags.go:377–382  ·  view source on GitHub ↗

asFiles enumerates the files that are found at "path" If a DataValuesFlags.ReadFilesFunc has been injected, that service is used. Otherwise, uses files.NewSortedFilesFromPaths() is used.

(path string)

Source from the content-addressed store, hash-verified

375// If a DataValuesFlags.ReadFilesFunc has been injected, that service is used.
376// Otherwise, uses files.NewSortedFilesFromPaths() is used.
377func (s *DataValuesFlags) asFiles(path string) ([]*files.File, error) {
378 if s.ReadFilesFunc != nil {
379 return s.ReadFilesFunc(path)
380 }
381 return files.NewSortedFilesFromPaths([]string{path}, *s.SymlinkAllowOpts)
382}

Callers 2

fileMethod · 0.95
kvFileMethod · 0.95

Calls 1

NewSortedFilesFromPathsFunction · 0.92

Tested by

no test coverage detected