MCPcopy Index your code
hub / github.com/hashicorp/packer / createFiles

Function createFiles

command/utils_test.go:19–30  ·  view source on GitHub ↗
(dir string, content map[string]string)

Source from the content-addressed store, hash-verified

17}
18
19func createFiles(dir string, content map[string]string) {
20 for relPath, content := range content {
21 contentPath := filepath.Join(dir, relPath)
22 if err := os.MkdirAll(filepath.Dir(contentPath), 0777); err != nil {
23 panic(err)
24 }
25 if err := os.WriteFile(contentPath, []byte(content), 0666); err != nil {
26 panic(err)
27 }
28 log.Printf("created tmp file: %s", contentPath)
29 }
30}
31
32type configDirSingleton struct {
33 dirs map[string]string

Callers 3

TestFmt_RecursiveFunction · 0.85
TestInitCommand_RunFunction · 0.85

Calls 1

DirMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…