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

Method FileList

environment/filesystem.go:135–145  ·  view source on GitHub ↗
(ctx context.Context, path string)

Source from the content-addressed store, hash-verified

133}
134
135func (env *Environment) FileList(ctx context.Context, path string) (string, error) {
136 entries, err := env.container().Directory(path).Entries(ctx)
137 if err != nil {
138 return "", err
139 }
140 out := &strings.Builder{}
141 for _, entry := range entries {
142 fmt.Fprintf(out, "%s\n", entry)
143 }
144 return out.String(), nil
145}
146
147// generateMatchID creates a unique ID for a match based on file, search, replace, and index
148func generateMatchID(targetFile, search, replace string, index int) string {

Callers 1

Calls 2

containerMethod · 0.95
StringMethod · 0.45

Tested by

no test coverage detected