MCPcopy
hub / github.com/dagger/container-use / FileDelete

Method FileDelete

environment/filesystem.go:126–133  ·  view source on GitHub ↗
(ctx context.Context, explanation, targetFile string)

Source from the content-addressed store, hash-verified

124}
125
126func (env *Environment) FileDelete(ctx context.Context, explanation, targetFile string) error {
127 err := env.apply(ctx, env.container().WithoutFile(targetFile))
128 if err != nil {
129 return fmt.Errorf("failed applying file delete, skipping git propagation: %w", err)
130 }
131 env.Notes.Add("Delete %s", targetFile)
132 return nil
133}
134
135func (env *Environment) FileList(ctx context.Context, path string) (string, error) {
136 entries, err := env.container().Directory(path).Entries(ctx)

Callers 1

Calls 3

applyMethod · 0.95
containerMethod · 0.95
AddMethod · 0.80

Tested by

no test coverage detected