MCPcopy Index your code
hub / github.com/dagger/dagger / AddNewFile

Method AddNewFile

sdk/python/runtime/discovery.go:136–138  ·  view source on GitHub ↗

AddNewFile adds a new file, with contents, to the module's source.

(name, contents string)

Source from the content-addressed store, hash-verified

134
135// AddNewFile adds a new file, with contents, to the module's source.
136func (m *PythonSdk) AddNewFile(name, contents string) {
137 m.ContextDir = m.ContextDir.WithNewFile(path.Join(m.SubPath, name), contents)
138}
139
140// AddFile adds a file to the module's source.
141func (m *PythonSdk) AddFile(name string, file *dagger.File) {

Callers 2

WithTemplateMethod · 0.95
invokeFunction · 0.80

Calls 1

WithNewFileMethod · 0.45

Tested by

no test coverage detected