MCPcopy Index your code
hub / github.com/dagger/container-use / writeFile

Function writeFile

environment/integration/helpers.go:137–144  ·  view source on GitHub ↗

Helper functions for repository setup

(t *testing.T, repoDir, path, content string)

Source from the content-addressed store, hash-verified

135
136// Helper functions for repository setup
137func writeFile(t *testing.T, repoDir, path, content string) {
138 fullPath := filepath.Join(repoDir, path)
139 dir := filepath.Dir(fullPath)
140 err := os.MkdirAll(dir, 0755)
141 require.NoError(t, err, "Failed to create dir")
142 err = os.WriteFile(fullPath, []byte(content), 0600)
143 require.NoError(t, err, "Failed to write file")
144}
145
146func gitCommit(t *testing.T, repoDir, message string) {
147 ctx := context.Background()

Callers 3

helpers.goFile · 0.70
WriteFileInSourceRepoMethod · 0.70

Calls

no outgoing calls

Tested by 1