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

Method WithMountedFile

sdk/python/runtime/internal/dagger/dagger.gen.go:3313–3332  ·  view source on GitHub ↗

Retrieves this container plus a file mounted at the given path.

(path string, source *File, opts ...ContainerWithMountedFileOpts)

Source from the content-addressed store, hash-verified

3311
3312// Retrieves this container plus a file mounted at the given path.
3313func (r *Container) WithMountedFile(path string, source *File, opts ...ContainerWithMountedFileOpts) *Container {
3314 assertNotNil("source", source)
3315 q := r.query.Select("withMountedFile")
3316 for i := len(opts) - 1; i >= 0; i-- {
3317 // `owner` optional argument
3318 if !querybuilder.IsZeroValue(opts[i].Owner) {
3319 q = q.Arg("owner", opts[i].Owner)
3320 }
3321 // `expand` optional argument
3322 if !querybuilder.IsZeroValue(opts[i].Expand) {
3323 q = q.Arg("expand", opts[i].Expand)
3324 }
3325 }
3326 q = q.Arg("path", path)
3327 q = q.Arg("source", source)
3328
3329 return &Container{
3330 query: q,
3331 }
3332}
3333
3334// ContainerWithMountedSecretOpts contains options for Container.WithMountedSecret
3335type ContainerWithMountedSecretOpts struct {

Callers 2

uvMethod · 0.45
WithSDKMethod · 0.45

Calls 3

assertNotNilFunction · 0.70
SelectMethod · 0.65
ArgMethod · 0.45

Tested by

no test coverage detected