MCPcopy Index your code
hub / github.com/jetify-com/devbox / allFiles

Function allFiles

internal/patchpkg/builder.go:428–439  ·  view source on GitHub ↗

allFiles iterates over all files in fsys starting at root. It silently ignores errors.

(fsys fs.FS, root string)

Source from the content-addressed store, hash-verified

426// allFiles iterates over all files in fsys starting at root. It silently
427// ignores errors.
428func allFiles(fsys fs.FS, root string) iter.Seq2[string, fs.DirEntry] {
429 return func(yield func(string, fs.DirEntry) bool) {
430 _ = fs.WalkDir(fsys, root, func(path string, d fs.DirEntry, err error) error {
431 if err == nil {
432 if !yield(path, d) {
433 return filepath.SkipAll
434 }
435 }
436 return nil
437 })
438 }
439}
440
441// lookPath is like [exec.lookPath], but first checks if there's an environment
442// variable with the name prog. If there is, it returns $prog/bin/prog instead

Callers 1

buildMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected